Saving a Script

In AppleScript Editor, you save a script by choosing File⇒Save or pressing Command Key+S. For the first time you save a script, AppleScript Editor displays the Save settings sheet. (The settings sheet does not appear when you choose Save for a script that is open and has previously been saved.) In the settings sheet, you can choose any of several different file formats for the saved script. The five options are Script, Application, Script Bundle, Application Bundle, and Text.

When you save a new script or create a copy of a script by choosing File⇒Duplicate or pressing Shift+Command Key+S and then saving the duplicate, you specify a file format by choosing the format from the File Format pop-up menu in the Save settings sheet. AppleScript Editor can save in the following file formats:

Script or Script Bundle: This saves the script as Apple event codes rather than plain text. You can open it with AppleScript Editor and then run or change it. You also can run scripts from the Finder or, in programs such as Microsoft Office 2008 and Apple's iWork '09 suite, via the Script menu (an icon of a stylized S). In AppleScript Editor, you can save scripts as Run Only so they cannot be edited, only run.

Application: This saves the script as an application, complete with an icon. Opening the icon ...

Get OS X Mountain Lion Bible 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.