TIMER

Windows Linux macOS

Syntax

TIMER START,<n>,<type>,<param>

TIMER PAUSE,<n>, ON|OFF

TIMER STOP,<n>

Description

DialogScript supports up to 9 timers which can be dynamically created, paused and stopped.

TIMER START,<n>,<type>,<param> where <n> is the timer identifier from 1 to 9. The <type> can be one of:

ALARM Specifies an alarm timer. The <param> is the alarm time. When the alarm time is reached, the timer generates a TIMER<n>ALARM event.
CHRONO Specifies a chronometer timer, which counts from zero up to the specified time. The <param> is the timer period. This parameter specifies the ending value for the timer. When the timer reaches this value it will stop and a TIMER<n>CHRONO event is generated.
CTDOWN Specifies a countdown timer, which counts from the specified time down to zero. The <param> is the timer period. This parameter specifies the starting value for the timer. When the timer reaches zero it will stop and a TIMER<n>CTDOWN event is generated.

TIMER PAUSE,<n>, ON|OFF suspends or continues the timer <n>.

TIMER STOP,<n> kills the specified timer <n>.

[VDS5] Values are specified as formatted strings in the format d-hh:mm:ss, regardless of regional time separator settings.

[VDS6] Values are specified as floating-point values (1.0 = one day) compatible with the @DATETIME function, which may be used to convert formatted time strings to floating-point format.

OK

Unchanged.

Example

TIMER START,1,CTDOWN,01-02:00:00

See a more advanced example...

See also