Using the If Command
Once you've figured out what kind of conditional step you need, you create the script in ScriptMaker. The syntax for a simple If statement to print a statement isn't much more complex than plain English.
To use the If command step
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 (in this case Account Balance).3 .Under the Control category in the script step list on the left, double-click If (Figure 8.1).
Figure 8.1. Double-click If to add it to the script-assembly list.
[View full size image]

Figure 8.2. When you add an If step to a script, the End If is added automatically.
Chapter 4, "Calculation Fields").5 .In the field list on the left, scroll to find your field (we use Balance Due). Double-click to add it to the formula box (Figure 8.3).
Figure 8.3. Choose the field you want the script to test in the If statement.
[View full size image]

Figure 8.4. Type 0 in the formula box.

Figure 8.5. Your conditional statement is added automatically to the If statement brackets.
[View full size image]

Figure 8.6. Steps inside If steps are indented.
Chapter 7, "Creating Simple Scripts.") Any script steps can be placed inside an If stepeven another If step.9 .In Script Step Options, click the Specify button to bring up the "Specify Script" Options dialog box. In the scrolling list, double-click the script that you want performed if there's a balance due (Figure 8.7). Since you don't have anything else you want the script to do if there's no balance due, the If statement is finished.
Figure 8.7. This step runs the sub-script Print Statement.
