Running Scripts

At this point you’re probably starting to see how scripts can be really useful in your database. The fact is, most large database systems are loaded with scripts that do all kinds of things. But the only way you’ve seen to run a script is pretty tedious: Chose Scripts → ScriptMaker, select the script, and then click Perform. That’s lots of clicks to run a script that’s supposed to save you time! Thankfully, there are a few other ways to run scripts that are more convenient, and you can set them up when you first create a script.

The Scripts Menu

You can show some or all of your scripts right in the Scripts menu. If you have a script or two that you want quick access to from anywhere, then it makes sense to put it in the Scripts menu. That way, anyone can run it by simply choosing it from the menu. There are even keyboard shortcuts for the first 10 scripts in the Scripts menu: Ctrl+1 (⌘1) through Ctrl+9 (⌘9) for the first nine, and Ctrl+0 (⌘0) for number 10. Since only the top 10 scripts will get keyboard shortcuts, you’ll want to put frequently used scripts up at the top, so you can save time using the keyboard instead of the mouse. Figure 13-8 shows how to assign a script to this menu in the Manage Scripts dialog box.

Defining Buttons

When you use the Button tool (see Figure 13-9, left), to draw a button on a layout, FileMaker shows you a list of script steps like the ones you get in ScriptMaker (Figure 13-9, right). You can attach any single script step from that list ...

Get FileMaker Pro 9: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.