![]() |
![]() |
timerStarts a timer |
|
Syntax | |
|
|
Description | |
Starts a new timer named <name> with the specified delay (in milliseconds). If a timer with the same name already exists, it is replaced by this one. The timer periodically calls the specified <callback_command> code passing the eventual <callback_param> strings as positional parameters. The <callback_command> is evaluated at timer "shot" time and NOT while this command is being parsed. This means that the identifiers that you put inside <callback_command> will NOT have the current values. The values will be assigned at timer "shot" time. This is a common scripters error and problem: if it is not clear, look at the examples below. The timer is bound to the window in that this command is executed in. If the window gets destroyed, the timer is stopped; unless the -p switch is used. The -p switch causes the timer to be persistent across the application and exists until the last window has been closed: it is basically rebound to another (random) window when the original window is destroyed. The -s switch cuases this timer to trigger only once: it will be automatically destroyed after that. The time has an associated set of extended scope variables: the variables that begin with "%:" have their life extended to the whole "life" of the timer. |
|
Examples | |
|
|
See also | |
killtimer |