Although discussing AppleScript is outside the scope of a FileMaker Pro book, it's definitely worth a mention because it allows you to combine FileMaker scripting with almost limitless ability to affect Macintosh Finder functions (like automatically backing up FileMaker databases at specific times of the day), and to initiate actions in other AppleScript-aware programsfrom simply cutting and pasting text between applications to mining your Netscape cache for interesting GIF files.
This example uses a simple script that copies the contents of a FileMaker field, switches to Microsoft Word, and pastes the text into a document.
1 .
Choose Scripts > ScriptMaker (Control+Shift+S/ Command+Shift+S).
2 .
In the Define Scripts dialog box, click New. When the Edit Script dialog box appears, name the new script (we use Paste into Word) (Figure 11.55).
3 .In the Navigation section of the script step list on the left, double-click Go to Layout.
4 .From the Specify drop-down list in the Script Step Options section, choose the layout that holds the field data you want to copy. Our example uses the Contract layout (Figure 11.56).
5 .
In the step list on the left, scroll down to the Editing section and double-click Copy (Figure 11.57).
6 .
In the Script Step Options section, click Go to Target Field to bring up the Specify Field dialog box. Double-click Contract to choose it from the field list. Leave "Select entire contents" checked unless you want to edit the field (Figure 11.58).
7 .In the script step list on the left, scroll down to Miscellaneous and double-click Perform AppleScript (Figure 11.59).
8 .
Under Script Step Options, click Specify.
9 .When the "Perform AppleScript" Options dialog box appears, type your AppleScript (Figure 11.60). Click OK three times to finish.
Although AppleScript is a very powerful tool for connecting FileMaker with other applications, it is not cross-platform. If you open a database file that uses AppleScript on a Windows computer, the scripts won't work.
To learn more about how to use FileMaker with AppleScript, check AppleScript for Applications: Visual QuickStart Guide by Ethan Wilde (Peachpit Press, 2001).