RunTimeout(
< seconds >)
The RunTimeout
command sets the timeout in seconds for any subsequent Run commands.
Parameters
< seconds
> Number of seconds allotted for the Run command to execute.
Remarks
- If the external
program takes up more time than allotted, then the program is terminated and
an implicit GOTO command is executed to the label ONRUNTIMEOUT.
If no such label exists, the IVR reports that the End of Script has reached and turns the LED red.
Example
:MAIN
answer
// external application timeout is set as 5 seconds
runtimeout 5
// calls windows notepad application
// please ensure that the AppWindow option is enabled in xivr configuration (xivrcfg.exe)
// If AppWindow option is disabled, you will not see the window of the application.
$cmdline = format("%s\notepad.exe",fs.GetEnv("SystemRoot"))
// start notepad and wait for 5 seconds.
// You will see notepad terminating within 5 seconds
run $cmdline $varfile
MsgBox("Application closed by user")
hangup
goto MAIN
:ONRUNTIMEOUT
MsgBox("Time expired. Application terminated.")
hangup
goto MAIN