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:
<nick> contextmenutest: 1
I want a menu entry, that displays something like:
"Found 1"
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:
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
set %menuparameters what ever i need to pass to the menu as parameters
hotlink -m @test
and in the menu add something like
Test:{ echo -a %menuparameters | unset %menuparameters }
But this is rather ugly