mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2015
Posts: 243
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
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

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Code:
on *:hotlink:test:*:{
  if ($hotlink(event) == rclick) { hotlink -m @menu }
}

menu @menu {
  Test:echo test
}

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
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
Joined: Feb 2015
Posts: 243
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
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

Joined: Feb 2015
Posts: 243
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
thanks Loki12583 smile that works great!! thnx for the enlightening!! cheers!!!

Last edited by OrFeAsGr; 07/03/15 03:42 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
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
}

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Ah, makes sense.
Thanks!


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

Link Copied to Clipboard