Home > Language Reference > System Variables > ActionTimeout


The #ActionTimeout system variable specifies the number of seconds which WinTask x64 should wait before reporting an execution error when a statement within a script fails.


Used to increase the delay before an execution error is reported. For example, a script downloads a file and this download takes around 45 seconds. The script waits until the download has completed by executing a UseWindow statement. But the default value for executing a UseWindow is 30 seconds and so the script fails. To increase this default wait time, before the UseWindow statement, add the line:
if the file dowload can take 60 seconds maximum.
And after the UseWindow statement, come back to the default value by this assignment:




<value>, integer, number of seconds for the object recognition timeout.


When WinTask x64 executes a statement, it tries to find the specified object during a maximum of #ActionTimeout seconds.  After this elapsed time, if the object is not found, Error Handling mechanism is used.

The default value for #ActionTimeout is 30 seconds.

If #ActionTimeout is set to 0, WinTask x64 waits forever.

See also




'This script detects if the Notepad window is present or not.
#IgnoreErrors=1  'Ignore errors: if an execution error occurs, do not display an error message
#ActionTimeout=10  'Wait a maximum of 10 seconds before reporting an error

'Launch notepad
'Use the Notepad window
ret=UseWindow("NOTEPAD.EXE|Edit|Untitled - Notepad|1")
'Test the return value of UseWindow to know if notepad is loaded or not
if ret=0 then
msgbox("Notepad window is present")
msgbox("Notepad window is not present")