Every script step consists of two partsthe step name, which is a description of what it does, and the step options inside brackets. If the brackets are empty, the step doesn't have any options selected. If there are no brackets, the step has no options available. If a step has options, its settings can be changed. Highlighting the step in the script-assembly list on the right displays its options below.
A newly added step is highlighted in the script-assembly list. New steps are added immediately below the highlighted step, so you should be careful not to select an earlier step in the window. If you do, any new steps you select will be inserted after the highlighted step, not after the last step in the window.
In this example, we'll create a script that finds records, sorts them, and prints a report from a specified layout.
1 .
Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).
When the Define Scripts dialog box appears, click New.
2 .When the Edit Script dialog box appears, type a descriptive name for the script in the Script Name text box (Figure 7.7).
3 .Scroll down to the Navigation category in the left window and double-click Go to Layout (Figure 7.8) to select it.
4 .
In the Script Step Options section, choose the layout you want to use for the script from the Specify drop-down menu (Figure 7.9).
5 .
In the Navigation category in the left window, double-click Enter Find Mode (Figure 7.10). In Script Step Options, leave Pause checked.
The script will pause in Find mode to allow you to enter find criteria.
6 .
Scroll down to the Found Sets category in the left window and double-click Perform Find (Figure 7.11).
7 .In the Found Sets category in the left window, double-click Sort Records.
8 .In the Script Step Options section, click Specify (Figure 7.12).
9 .When the Sort Records dialog box appears, the sort criteria you last used for your layout will appear (Figure 7.13). To change the sort order, drag the fields up and down in the Sort Order list, or click Clear All and create a new sort order.
10 .Click OK to close the Sort Records dialog box.
11 .Scroll down to the Files category in the left window and double-click Print Setup (Figure 7.14).
12 .In the Script Step Options section, click Specify.
13 .When the Print Setup (Windows)/Page Setup (Mac) dialog box appears, set your printer and paper settings. Click OK when done.
14 .
In the Files category in the left window, double-click Print (Figure 7.15).
To print using the settings defined in the previous step, check the "Perform without dialog" box in Script Step Options. To choose printing options each time you run the script, leave this box unchecked.
15 .
Scroll to the Navigation category in the left window and double-click Go to Layout to add this step to the end of the script (Figure 7.16). Leave its Option set to "original layout."
This step will return you to the layout you were in before you ran the script.
16 .Click OK to save the script and return to the Define Scripts dialog box. Click OK to close ScriptMaker.