Although you can run any script from the Script menu list, it's easier to just click a button than to click, drag, and select. But script buttons do more than save a couple of seconds. For instance, it's easy to forget which script belongs with a layout. And if other people use your database, they could make a remarkable mess of it by running the wrong script at the wrong time.
1 .Choose View >Layout (Control+L/ Command+L). Switch to the layout where you want to place the button.
2 .Click the Button tool (Figure 9.12).
3 .
Dragging the cursor on the layout creates the button and brings up the Specify Button dialog box. In the Control section of the list on the left, click Perform Script.
4 .In the Options section, click Specify. In the "Specify Script" Options dialog box, choose the script name from the list (Figure 9.13). Click OK twice.
5 .The button will appear in the layout with the text cursor flashing (Figure 9.14). Type a descriptive label, then select the text and format it as desired.
6 .
Switch to Browse mode and click the new button to test the script.
You're not limited to the default look of a FileMaker button. The tools used for creating graphics can also be used to change the thickness or color of the lines and the color or fill pattern of a button.
If you use a graphic element to create a button (instead of the Button tool), click the graphic and choose Format > Button to specify what the button does.
There are many ways to make buttons for your interface. The easiest is to just use the Button tool, which does a reasonable job of making simple text buttons with geometric shapes. You can also use premade art. Some earlier versions of FileMaker included sample graphic buttons (Appendix A for premade button sets that you can download.
Figure 9.15. Sample buttons.