Autoscripts use the same syntax and editor as regular scripts. Unlike standard script files, an autoscript file can contain many separate scripts. To create an autoscript, you first need to run the procedure that creates the type of output to which the autoscript will be applied.

step From the menus choose:

Analyze
 Descriptive Statistics
  Frequencies

step Move the Marital Status item to the target list.

step Click OK to create the table.

step Right-click on the Marital Status table in the Viewer.

step Select Create/Edit Autoscript from the pop-up context menu.

A Script Editor window opens and a new entry is automatically inserted into the current autoscript file. The new entry contains the code that identifies the type of output item, and specifies that the script you enter will be run whenever that type of output item is created.

In this example, code already exists for the type of output selected. You can either edit the existing code, or delete it and add your own.

step To launch the object browser, from a Script window's menus choose:

Debug
 Object Browser

A brief description of the currently selected object is displayed. Click the help button for a more detailed description. Click Paste to insert the selected item into the Script Editor.