Tutorial

Table Of Contents
Lesson 8
|
Automating tasks with buttons and scripts 59
6.
From the list on the left, scroll down, select the
Enter Preview Mode
script step, and move it over to your script.
7. Close the Edit Script dialog box, click Save, then close the Manage Scripts dialog box.
8. To run the script you have just created: Switch to Browse mode, and choose Scripts menu > Preview
Labels Layout. FileMaker Pro displays the Labels layout and switches to Preview mode.
Assign a script to a button
While buttons are generally more convenient for users, scripts are a more powerful feature, allowing you to
combine many menu commands into a single executable action. Using a button to run a script gives you the
best of both features.
To assign the script you just created to the button you created earlier:
1. Choose Data Entry from the Layout pop-up menu in the layout bar.
2. Click Exit Preview, then Edit Layout in the layout bar.
3. Double-click the button you created earlier in this lesson.
4. In the Button Setup dialog box, select the Perform Script script step near the top of the list on the left.
5. In the Options area, for Current Script click Specify. Select Preview Labels Layout from the list of
available scripts, and click OK.
6. Leave the rest of the default button settings as they are and click OK.
Rename the button
1. Select the Text tool in the status toolbar.
2. Click the button once. The text insertion point appears in the button.
3. Select the button text and type Preview Labels Layout to rename this button. You may have to
resize the button after renaming it.
The finished
script
Select
Perform
Script