Countdown - Forum

Forum Navigation
Climate strike banner
You need to log in to create posts and topics.

Countdown

Looking for a good countdown script - at the moment we are running a script that literally loops a decreasing variable but it's a bit clunky.

We need to be able to manipulate (add or subtract) to the countdown as well.

Any ideas?

Hi, I don't think this is much better then the one you use at the moment, but I use this for my countdown. There may be better options out there. This way you can manipulate [CountDown] and [Set].  Regards

SetVar "[CountDown]" "[Set]"
Math "[CountDown]-1" "" "[CountDown]"
Delay "1000"
If "[CountDown]" "=" "0"
.Insert action here
Else
GotoLine "2"
EndIf

 

Update

SetVar "[CountDown]" "[Set]"
Delay "1000"
Math "[CountDown]-1" "" "[CountDown]"
Delay "1000"
If "[CountDown]" "=" "0"
.Insert action here
Else
GotoLine "3"
EndIf

 

Loop "10" "1" "[i]"

.....

EndLoop

@clueadventures:

Check out my blog post here ... https://visualneo.com/visualneo-win/count-up-down-display-of-time-in-hhmmss ... but be sure to read the comments regarding typo errors introduced in translation from the article on my website ... if you want, you can copy/paste the error-free code from here ... http://www.scriptedlogic.com/zzold/neoHOW5.htm

Thanks All for you help, some useful ideas here.