Chapter 2. Using Script Editor with OS 9 and OS X

Unless you decide to use a commercial development environment to create scripts, the free Script Editor will be your principal AppleScripting tool.[3] This is fine; many AppleScript purists have clung to Script Editor and still find it easy to use, even though it hasn’t changed that much in years. Besides, it’s free with the Mac OS 9 and OS X installation. You can find Script Editor in the /Applications/AppleScript folder in Mac OS X; in OS 9, this application is located in startup disk:Apple Extras:AppleScript.

Script Editor is particularly useful for creating the first versions of scripts using the Finder in OS 9. You can record most tasks involving the Finder (such as an action involving a file, folder, or disk), and then make any manual changes later in Script Editor. Chapter 1 , describes the recording of scripts.

The rest of this chapter is devoted to explaining the principal commands and controls of this program. I will also describe some basic scripting mechanics such as file-saving options and describe how to view dictionaries. The chapter concludes with an example applet that turns around and controls its creator.

Figure 2-1 shows what the Script Editor and its Results window (which displays the return values for its executed code) look like on the OS X desktop. The Script Editor includes controls and menus to:

Script Editor on OS X
Figure 2-1. Script ...

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.