On Error Tab

 

Most macro command windows have a corresponding On Error tab for error handling during playback of the macro. For example if a specific condition isn't met during macro playback, such as a file or a window could not be found, the On Error tab can instruct the macro to stop, ignore the error and proceed, or prompt for a course of action.

 

 

 

Script Editor > Open Any Macro Command Window > On Error Tab

 

 

In the example above the Window Activate command has four possible types of errors that may occur during macro playback. Each command lists a different set of errors that are pertinent to that specific macro command. In most cases it is appropriate to just leave the default action for each of the errors. But there may be cases for debugging or other situations where one of the other actions is more appropriate. A description of the actions is listed below.

 

 

Halt Macro

Halt Macro stops the macro if the error occurs during playback. This is the default error action and the one most commonly required.

 

 

Ignore Error

Ignoring the error instructs the macro to continue even though the error has occurred.

 

 

Prompt for Action

If an error occurs, a message similar to the one below appears on the screen prompting the user to decide how to proceed with the macro. Choose to stop the macro or ignore the error and continue.