mIRC Home    About    Download    Register    News    Help

Print Thread
#249654 10/12/14 07:29 AM
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
I needed to do an action at TIME everyday and wrote the following:

.timertest -o TIME 1 0 ACTION $(|) .timertest -o TIME 1 0 $!timer(test).com

Rather than doing what I expected, once TIME is reached, the ACTION is executed, as expected, but after that, when 'reloading' the timer for the next day, mIRC just trigger the ACTION indefinitely until TIME has passed. The real issue here is that I consider that //timer 08:00 1 0 echo -a $!ticks should not trigger if time is less than/equal to 08:00:00, or at least it should trigger once for a timer command executed before that time (as in if you execute the timer at 07:59:59 for 08:00 and mIRC freezes for some reasons and is working back again at 08:00:01, it should trigger probably)

Is this on purpose? Should I use a temp timer to run one minute after to 'reload' my timer so it doesn't get caught here?

Last edited by Wims; 10/12/14 07:32 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Quote:
The real issue here is that I consider that //timer 08:00 1 0 echo -a $!ticks should not trigger if time is less than/equal to 08:00:00
I meant I didn't expect it to trigger if the timer command is executed after the time has passed, //timer 08:00 2 0 echo -a $!ticks would not trigger if $time is 08:00:01 or greater.

Well I guess the current behavior makes sense because only the hours/minutes matter here. And while allowing this TIME parameter of /timer to accept second, it wouldn't help in my case anyway since I would have to delay by one second by using a temp timer or something.


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

Link Copied to Clipboard