mIRC Homepage
Posted By: OrFeAsGr Pop Up Menu From Hotlink event? - 07/03/15 01:48 AM
hi.. i don't need this but i was just wondering if there is a way to have a menu pop out from a hotlink match.. i have played around with this event and understood how to use it.. but haven't found out if i can have a menu pop up .. smile
Posted By: Nillen Re: Pop Up Menu From Hotlink event? - 07/03/15 12:14 PM
I'm not entirely sure what you want to accomplish by this, but you can script your own dialogs to pop up on the hotlink event.
Posted By: Loki12583 Re: Pop Up Menu From Hotlink event? - 07/03/15 01:52 PM
Code:
on *:hotlink:test:*:{
  if ($hotlink(event) == rclick) { hotlink -m @menu }
}

menu @menu {
  Test:echo test
}
Posted By: Nillen Re: Pop Up Menu From Hotlink event? - 07/03/15 03:36 PM
Ah, I see. Didn't know menus could be used in such a way.
That's actually really useful!

How would I use this to return the full sentence?

I tried something generic such as
"Hello good sir!", matching "*sir*" and echoing $1- would only return just "sir!".
Posted By: OrFeAsGr Re: Pop Up Menu From Hotlink event? - 07/03/15 03:39 PM
Originally Posted By: Nillen
I'm not entirely sure what you want to accomplish by this, but you can script your own dialogs to pop up on the hotlink event.

you're right. Good idea! I Haven't thought of any use about it , i was just exploring the event
Posted By: OrFeAsGr Re: Pop Up Menu From Hotlink event? - 07/03/15 03:41 PM
thanks Loki12583 smile that works great!! thnx for the enlightening!! cheers!!!
Posted By: Loki12583 Re: Pop Up Menu From Hotlink event? - 07/03/15 04:10 PM
Originally Posted By: Nillen
How would I use this to return the full sentence?


$1 is filled only with the word which was clicked, passing anything else requires setting something with global scope: a variable, hash table, or other.

Code:
on *:hotlink:test:*:{
  if ($hotlink(event) == rclick) {
    set %hotline $hotline
    hotlink -m @menu
  }
}

menu @menu {
  Test:echo test %hotline $1
}
Posted By: Nillen Re: Pop Up Menu From Hotlink event? - 07/03/15 04:25 PM
Ah, makes sense.
Thanks!
© mIRC Discussion Forums