User manual

Table Of Contents
Creating scripts to automate tasks
10-13
5. At the insertion point, type a label for the button, and then press
Enter on the numeric keypad.
6. Switch to Browse or Find mode to use the button.
Keep these points in mind:
1 To show borders around buttons in Layout mode, choose
View menu > Show > Buttons. See “Setting color, pattern, line width,
and object effects,” on page 7-14.
1 To set buttons so they don’t print, see “Keeping objects from
printing,” on page 7-25.
1 FileMaker Pro doesn’t store settings (like find requests) with a
button, but you can define a script that stores the settings and then
define a button to perform it. See “Storing settings before creating a
script,” on page 10-4.
Copying, changing, or deleting buttons
Example of a ScriptMaker script
The following script shows one way to find duplicate records in your
database. It demonstrates the use of a global field, a stored Find
Request, a stored Sort order, and the If and Loop script steps.
Finding duplicate records
In this example, a travel agency uses a registration database to track
clients who sign up for a cruise seminar. The database contains
duplicate records because some clients called the travel agency to
sign up and also mailed in a registration form for the same seminar.
The following sections explain how to set up a database and define a
script to find duplicate records.
Note For this example, you should understand global fields and
know how to define fields. See “Defining global fields,” on page 5-8.
1. Create a unique value for each record.
To Do this in Layout mode
Select a button Use the selection tool. See “Selecting objects,” on
page 6-12.
Move a button Using the selection tool, drag the button. See “Moving
objects on a layout,” on page 6-14.
Select
a step
Set options
for the step
Select a
button style
Change the
appearance of a
button
See “Setting color, pattern, line width, and object effects,”
on page 7-14.
Change a button
label
See “Formatting text,” on page 7-12.
Copy a button When you copy a button, you copy the object and the
button definition. If you copy a button from another file,
change the button definition if fields, layouts, or scripts
don’t match. See “Copying, duplicating, and deleting
objects,” on page 6-13.
Change a button
definition
Double-click the button. In the Specify Button dialog box,
select a step and options, then click OK.
Delete a button Select the button, then press Delete or Backspace.
To Do this in Layout mode