Description
The #ErrorCode
system variable retrieves the return code of the WinTask function that triggered the OnAction Error procedure.
Usage
When a script is replayed with #IgnoreErrors=1
, and if the script fails, the error code is not displayed. You can use the #ErrorCode
system variable to know the error code which explains why the script failed.
Syntax
var=#ErrorCode
See also
OnAction Error
Example
msgbox(#ErrorCode)