A timer item 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:
utility test "test1"
(
timer clock "testClock" interval:400
label test "1"
on clock tick do
(
valUp = (test.text as integer)+1
test.text = valUp as string
)
)
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.
Events
on <timer> tick do <expr>
Called when timer ticks.
See also
Rollout User-Interface Items Common Properties