mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
When you manually type a /timer command in any window, the .wid property is associated to this window. This has a number of beneficial uses, including the ability to use target agnostic commands like /say and /me, and to call custom aliases that use the same, from within the Timer.

When a Timer is set in an Event such as On Text, the .wid property does not inherit the WID of the channel or query or chat associated with the Event target. It would be very useful if the Timer's .wid property were set the same way it is when it's hand-typed. Instead, the Timer just inherits the .wid of the Status Window.

Target agnostic commands can be used by hand-typing, they can be used in hand-typed Timers, they can be used in Events, but they CAN'T be used in Event's Timers.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
This is most likely related to these last two posts: https://forums.mirc.com/ubbthreads.php/ubb/showflat/Number/242890/

However I believe it should be changed, first I don't think there are (m)any scripter who knows about this and who are expecting status windows' wid but $wid clearly knows the correct value, I think /timer should be using $wid's value. if backward compatibility are an issue, a new switch for /timer could be a thing


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Feb 2003
Posts: 2,812
Raccoon Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Also, one reason why I feel this is especially pertinent, is because we try to teach people to pass aliases to timers, instead of long eccentric commands. At the moment, if your alias uses commands like 'say' or 'me' to macro or decorate text responses, they can't be called from a Timer that is set within an Event. You have to dump the contents of said aliases directly into the Timer's /commands.

Why are target agnostic commands like 'say' and 'me' ideal to 'msg' and 'describe'? Because you don't need to screw around with /if conditions for '/msg $chan' or '/msg $nick' or '/msg =$nick' ... the 'say' command does all these things automatically as necessary.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard