Bug when using EnableTimer to disable the same timer.

Posted by Coderunner on Wed 07 Oct 2009 07:44 AM — 4 posts, 17,640 views.

USA #0
Hello,
I have noticed that when using EnableTimer in the "send" text box to disable the same timer, that the timer either executes instantly, or doesn't execute at all.
I have tried getting the results I want by checking the "only fire once" checkbox, but unfortunately, it deletes the trigger instead of disabling it after one execution.
USA #1
Try using ResetTimer() when you disable it, to reset the time-till-fire.
Australia Forum Administrator #2
Agreed.

http://www.gammon.com.au/scripts/doc.php?function=ResetTimer

Enabling a timer does not change when it fires, ResetTimer does that. However resetting a disabled timer doesn't work either.

You need to enable it, and then immediately reset it, for the timer to start counting up again.
USA #3
Thanks.