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.

From the menus choose:

Analyze
Descriptive Statistics
Frequencies

Move the Marital Status item to the target list.

Click OK to create the table.

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

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.

- Use the Help menu to get tips on writing scripts.

- Use the object browser to get a list of all the available objects and methods.

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.