Automating FileMaker Pro: Scripting, Calculations, and Data Transfer

The previous chapter provided an overview of how to create, execute, and design scripts. In this chapter, you will start to find the nitty-gritty of scripting.
Periodically, you need to communicate with users from within a FileMaker Pro script. This may be in order to provide information (such as "Record added") or to get information (such as "Enter Client Name"). Although these are interface issues, they are different from the interface issues described in the following chapter. There, FileMaker Pro interface script steps are described. Here, interfaces to the scripts themselves are described.
This step displays a message in a dialog box. The dialog box remains on the screen until the user dismisses it. The message is part of the script: you cannot put variable information into it.
In addition to the text of your message, the dialog box contains at least one button. By default, it contains two: OK and Cancel. (You can rename each of the three buttons.)
When the user clicks a button, the dialog box closes. You can use the Status (CurrentMessageChoice) function to find out which button was clicked: they are numbered 1, 2, and 3 for the Macintosh and 0, 1, and 2 for Windows. (They are numbered from right to left, with the default button being OK and 0 or 1.)
If you are simply presenting information, the user clicks the OK button and your script continues. However, if you need to take action based...