Morning Pfeil, thank you for that I'm going to have a good look through it, browsing the forums I found a really nice looking timer I've been adapting had a few weird things happen so I obviously don't understand something going on within the code:
Set Countdown for [1..40] Minutes
Set small int (condition) [Timer] value to 0
Set small int (condition) [UpdateLog] value to 0
Set small int (condition) [MinsElapsed] value to 0
Begin Text Compare : [{EXP: {TXTNUM:"{CMD}"} > 0}] Equals '1'
Set small int (condition) [Timer] value to the converted value of {EXP:({SMALL:Timer} + {TXTNUM:"{CMD}"})*60} (save value to profile)
Write [Purple] ':/> Timer set for [{SMALL:Timer}] Seconds' to log
End Condition
Set small int (condition) [TimerCount] value to the value of [Timer]
Set small int (condition) [MinsRemaining] value to the value of [{EXP:({SMALL:TimerCount} / 60)}]
Start Loop While : [TimerCount] Does Not Equal 0
Pause 0.1 seconds
Set small int (condition) [TimerCount] value as decremented by 1
Set small int (condition) [UpdateLog] value as incremented by 1
Begin Small Integer Compare : [UpdateLog] Equals 60
Set small int (condition) [MinsElapsed] value as incremented by 1
Write [Purple] ':/> [{SMALL:MinsElapsed}] Minute Has Elapsed' to log
Write [Purple] ':/> [{SMALL:MinsRemaining}] Remaining' to log
Begin Small Integer Compare : [MinsElapsed] Is Greater Than Or Equals 2
Write [Purple] ':/> [{SMALL:MinsElapsed}] Minutes Have Elapsed' to log
End Condition
Set small int (condition) [UpdateLog] value to 0
End Condition
End Loop
Write [Purple] ':/> Timer has stopped after [{SMALL:Timer}] Seconds' to log
Write [Purple] ':/> Timer has stopped after [{SMALL:MinsElapsed}] Minutes' to log
Say, 'Time is up Commander'
And then using to check time remaining:
How much time remains
Set small int (condition) [RemainingTime] value to the value of [TimerCount]
Write [Purple] ':/> Remaining Time is [{SMALL:RemainingTime}] Seconds' to log
That runs mostly fine, apart from the MinsRemaining I'm obviously not understanding how to use {EXP: properly so going to do some reading in the manual today along with that code you've done (thank you again) and see if i can shed some light on that.
Originally I was going to try and set it for absolute time, using both mins & secs but when I did create the cmd it said it was going to have to add 2360 dynamic commands which could slow VA down.