Creating a Basic Script
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.
To create a basic script
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).
Figure 7.7. Script names should describe the script's function.
[View full size image]

Figure 7.8. Go to Layout switches to the specified layout.

Figure 7.9. Since the layout name is in brackets, it can be changed to any other layout in the database.
[View full size image]

Figure 7.10. Enter Find Mode pauses to let you change the criteria before the script continues to the next step.

Figure 7.11. Perform Find creates a found set from your criteria.
[View full size image]

Figure 7.12. Clicking Specify allows you to set specific parameters to sort your found set.
[View full size image]

Figure 7.13. Your most recent sort appears in the Sort Records dialog box.

Figure 7.14. The brackets after Print Setup are empty because there are no default printer or paper settings.
[View full size image]

Figure 7.15. If you don't specify new settings in the Print step, the script will use the settings you set in the Print Setup step.
[View full size image]

Figure 7.16. Add the Go to Layout [original layout] step at the end of the script so you end up back where you started when the script is finished.
[View full size image]
