mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
A line of code like this, involving non named $regml:
Code
//noop $regex(a,(a)) | echo -ag regml1: $regml(1) | .timer -ho 1 0 echo -ag Tregml1: $!regml(1)
Shows that $regml(1) works correctly when evaluated because of the timer executing its command.
But I was trying this from an on hotlink event and $regml is only working inside the event, is it $null when the timer fires:

Code
on $*:hotlink:/(a)b/:*:echo -ag regml: $regml(1) | .timer -ho 1 0 echo -ag Tregml: $!regml(1)
use "//echo -ag ab" to display ab in the active window and hover it with your mouse

I feel like this is a bug, not sure, but the inconsistency with how it works outside of an event is there.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
Thanks for your bug report. This has been discussed before. A $regml() that is unnamed is context-dependent. It is repeatedly cleared and reused in many different contexts. You need to use it in the context in which it was created.

Joined: Jul 2006
Posts: 4,145
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
I cannot pass a name when the regex is created with the event definition, I'll have to use $unsafe($regml(1)) with the timer then.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard