number Application.GetLastError (



Returns the last error code.

Tip: Use this to check whether an error occurred while performing the last action.




(number) The error code for the last action that was performed. (0 if the action succeeded, a number greater than 0 if the action failed.)

See Error Codes for the complete list of error codes.

Note: All of the error code messages are stored in a table called _tblErrorMessages and can be accessed by their error code index. For example, accessing the table index _tblErrorMessages[1000] will access the error code string "The specified file could not be found."


When adding an action with the script editor, you can use this field to specify a variable that the return value will be stored in.

See also:  Related Actions