Script Saving Options

You have four different options for saving a file in Script Editor; however, Mac OS X does not support the stationery option of OS 9. These options are available from the File Save or File Save As menu choices.

Tip

A droplet is by definition saved as an applet, but AppleScript gives it a different icon due to the enclosure of its code in an on open handler.

Figure 2-6 shows the icons for AppleScript file types. Mac OS X supports all of these icon types except the stationery one.

Icons for AppleScript file types
Figure 2-6. Icons for AppleScript file types

Script text file

If a script cannot compile without errors, or you just want to save it as plain text, then use the script text saving option. The text option saves the file as file type 'TEXT' and creator type 'ToyS'. In OS X, Script Editor tries to compile a script first when you save it, then displays a dialog window if the script cannot be compiled without error, giving the user the option of saving the script as a text file. If you are not finished with the script and therefore do not yet want to try compiling the source code, then you can skip the compilation stage by holding down the Shift key and choosing Script Editor’s File Save menu item. The file will only be saved as a text file.

Compiled script file

Script Editor will try to compile the source code before saving it. After a script is saved as a compiled script, double-clicking ...

Get AppleScript in a Nutshell 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.