Description
- Starts, stops or toggles the specified timer(s) and sets the value.
Syntax
- Timer.Set("[cAxn][cAddSub]sTimers newHMS")
Parameters
- cAxn
- (string) single character representing the action to take
- Optional, if omitted, the timer state is unchanged.
-
Possible Values
- +
- timer(s) in sTimer parameter are started
- -
- timer(s) in sTimer parameter are stopped
- *
- timer(s) in sTimer parameter are toggled
- cAddSub
- (string) single character indicating whether to add, subtract or absolutely set the timer value
- Optional, if omitted, the timer is set to an absolute time as specified by newHMS parameter.
-
Possible Values
- @
- add the value in newHMS parameter to current timer value
- $
- subtract the value in newHMS parameter from current timer value
- sTimers
- (string) single string of timer ID's to be set, with no spaces between them
- newHMS
- (string) the new timer value, as 3 space-separated integers: hours, minutes & seconds
Examples
- Timer.Set("+a 0 0 0")
- Clears timer a and starts it.
- Timer.Set("+a 0 0 120")
- Starts timer a at 120 seconds.
- Timer.Set("bf 0 10 20")
- Resets timers b and f to 10 minutes, 20 seconds, leaving their running/stopped state unchanged.
- Timer.Set("-c 1 0 0")
- Stops timer c and sets its value to one hour.
- Timer.Set("@aq 2 3 0")
- Adds 2 hours and 3 minutes to timers a and q.
- Timer.Set("$q 2 3 0")
- Subtracts 2 hours and 3 minutes from timer q.