In "To create a sub-script to find records," we created several sub-scripts. Because they're small and modular, we can swap them in and out to create customized master scripts that do essentially the same things for a wide variety of different criteria. For this example we'll create a script that combines a find sub-script and a sort sub-script, then prints the result.
1 .Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).
2 .When the Define Scripts dialog box appears, click New.
3 .When the Edit Script dialog box appears, type Print Sales Report in the Script Name box.
4 .
In the step list on the left, scroll down to the Navigation section and double-click Go to Layout.
5 .In the Script Step Options section, choose your report layout from the Specify drop-down menu (Figure 7.29). In our example, we use Sales Report.
6 .Double-click Print Setup/Page Setup in the Files section of the step list. When the Print Setup/Page Setup dialog box appears, set the options for printing the report (Figure 7.30). Click OK.
7 .In the step list on the left, double-click Perform Script in the Control section to add it to the script-assembly list.
8 .
In the Script Step Options section, click Specify. When the "Specify Script" Options dialog box appears, choose Find Checks from the scrolling window (Figure 7.31).
9 .Double-click Perform Script again to add a second Perform Script step to the script-assembly list on the right.
10 .In the Script Step Options section, click Specify. When the "Specify Script" Options dialog box appears, choose Sort by Last Name from the Specify menu (Figure 7.32). Click OK.
11 .In the step list on the left, scroll to the Files section and double-click Print. You can choose to have the Print dialog box appear by leaving the "Perform without dialog" box unchecked (Figure 7.33).
12 .Click OK to add the script to the Define Scripts listing, then click OK to exit ScriptMaker.
Sub-scripts can take up precious room in the Scripts menu list. If you don't expect to use any of the sub-scripts by themselves, uncheck the "Include in menu" box next to the name in the Define Scripts dialog box (Figure 7.34).