A timer control generates tick events at set intervals. Timer is unlike the remainder of the user-interface items as it is not a visible control. Timer lets the user interface react, animate, or change without user interaction, such as having animations playing on the rollout, checking for certain conditions or events before continuing, displaying nag/splash screens, and so on.
The syntax is:
timer <name> [interval:<number>] [active:<boolean>]
EXAMPLE:
rollout test "Test Timer" ( timer clock "testClock" interval:1000 --tick once a second label test"1" on clock tick do ( valUp = (test.text as integer)+1 test.text = valUp as string ) ) createDialog test
Parameters:
interval:
An integer value specifying the time in milliseconds between tick events. Default value 1000 (1 second).
active:
Specifies whether the timer emits tick events. Default value true
.
Properties:
<timer>.interval Integer
Integer value specifying the time in milliseconds between tick events.
<timer>.active Boolean
Specifies whether the timer emits tick events ( true
) or not ( false
). When first set to true
, the first tick event is generated in interval
milliseconds.
<timer>.ticks Integer
The read/write .ticks
property is incremented by 1 on each ‘tick’ of the timer. Can be both get and set.
Events:
on <timer> tick do <expr>
Called when timer ticks.