mIRC Home    About    Download    Register    News    Help

Print Thread
Pop Up Menu From Hotlink event? #251863
07/03/15 01:48 AM
07/03/15 01:48 AM
Joined: Feb 2015
Posts: 243
Greece
O
OrFeAsGr Offline OP
Fjord artisan
OrFeAsGr  Offline OP
Fjord artisan
O

Joined: Feb 2015
Posts: 243
Greece
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

Re: Pop Up Menu From Hotlink event? [Re: OrFeAsGr] #251873
07/03/15 12:14 PM
07/03/15 12:14 PM
Joined: Dec 2013
Posts: 779
Sweden
N
Nillen Offline
Hoopy frood
Nillen  Offline
Hoopy frood
N

Joined: Dec 2013
Posts: 779
Sweden
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.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Pop Up Menu From Hotlink event? [Re: Nillen] #251877
07/03/15 01:52 PM
07/03/15 01:52 PM
Joined: Jan 2004
Posts: 1,271
L
Loki12583 Online
Hoopy frood
Loki12583  Online
Hoopy frood
L

Joined: Jan 2004
Posts: 1,271
Code:
on *:hotlink:test:*:{
  if ($hotlink(event) == rclick) { hotlink -m @menu }
}

menu @menu {
  Test:echo test
}

Re: Pop Up Menu From Hotlink event? [Re: Loki12583] #251878
07/03/15 03:36 PM
07/03/15 03:36 PM
Joined: Dec 2013
Posts: 779
Sweden
N
Nillen Offline
Hoopy frood
Nillen  Offline
Hoopy frood
N

Joined: Dec 2013
Posts: 779
Sweden
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!".


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Pop Up Menu From Hotlink event? [Re: Nillen] #251879
07/03/15 03:39 PM
07/03/15 03:39 PM
Joined: Feb 2015
Posts: 243
Greece
O
OrFeAsGr Offline OP
Fjord artisan
OrFeAsGr  Offline OP
Fjord artisan
O

Joined: Feb 2015
Posts: 243
Greece
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

Re: Pop Up Menu From Hotlink event? [Re: Loki12583] #251880
07/03/15 03:41 PM
07/03/15 03:41 PM
Joined: Feb 2015
Posts: 243
Greece
O
OrFeAsGr Offline OP
Fjord artisan
OrFeAsGr  Offline OP
Fjord artisan
O

Joined: Feb 2015
Posts: 243
Greece
thanks Loki12583 smile that works great!! thnx for the enlightening!! cheers!!!

Last edited by OrFeAsGr; 07/03/15 03:42 PM.
Re: Pop Up Menu From Hotlink event? [Re: Nillen] #251882
07/03/15 04:10 PM
07/03/15 04:10 PM
Joined: Jan 2004
Posts: 1,271
L
Loki12583 Online
Hoopy frood
Loki12583  Online
Hoopy frood
L

Joined: Jan 2004
Posts: 1,271
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
}

Re: Pop Up Menu From Hotlink event? [Re: Loki12583] #251884
07/03/15 04:25 PM
07/03/15 04:25 PM
Joined: Dec 2013
Posts: 779
Sweden
N
Nillen Offline
Hoopy frood
Nillen  Offline
Hoopy frood
N

Joined: Dec 2013
Posts: 779
Sweden
Ah, makes sense.
Thanks!


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net