Working with Scripts in FileMaker Pro 5
- Working with Scripts in FileMaker Pro 5
- To create a file's pre-script settings
- To define a script
- To change a script
- To copy a script
- Importing a script
Working with Scripts in FileMaker Pro 5
CREATING A SCRIPT IS A LOT LIKE designing a database: The more you plan it out in advance, the smoother the actual construction will go.
In planning a script, break the task you want to perform into the smallest pieces possible. These pieces, which FileMaker calls steps, are easier to build than a long, single script. With this modular approach, you can recombine the steps into other scripts later on. FileMaker contains many predefined scripts, reducing the need for you to generate a step from scratch.
Most of FileMaker's scripting steps are put to use within just two dialog boxes. The Define Scripts dialog box is where you create (name), rename, edit, duplicate, and delete scripts, as well as test them (Figure 1). All available script steps are listed within the Script Definition dialog box, which is where you build a script once you name it (Figure 2).
Figure 1 Use the Define Scripts dialog box to create, rename, edit, duplicate, delete, and perform (test) scripts.
Figure 2 Use the Script Definition dialog box to build scripts by selecting script steps in the left-hand list and building your script in the right-hand window.
Preparing to create a script
When you begin defining a script, you'll find that FileMaker has saved some of the open database's current settings, if they exist, and included them in the Script Definition dialog box. For that reason, it's best to select such things as the file's layout, view, and sort order before you define a script for it. FileMaker calls this storing pre-script settings. Mind you, you don't have to do this, but it saves you some scripting work.