When creating a context menu using /hotlink -m, it would be great to be able to pass parameters, to be used as $1, $2... inside the menu:

Example: Let's assume the following:
Code:
<nick> contextmenutest: 1

I want a menu entry, that displays something like:
"Found 1"

Code:
menu @test {
  test:echo -a Found $1
}

on *:HOTLINK:*contextmenutest*:*:{
  if ($hotlink(event) == rclick) {
    noop $regex($hotlink(line),/contextmenutest: (\d+)/)
    hotlink -m @test $regml(1)
  }
}

This is not possible. The result is:
Code:
Found contextmenutest:

because $1 in the menu is always the hotlink-word.


Also $hotlink(...), $hotline, $hotlinepos are not available inside the menu, so I can't move the $regex part in the menu definition.

The only workaround I can think of is something like
Code:
set %menuparameters what ever i need to pass to the menu as parameters
hotlink -m @test


and in the menu add something like
Code:
Test:{ echo -a %menuparameters | unset %menuparameters }


But this is rather ugly

Last edited by m0viefreak; 13/06/12 11:47 PM.