Before scripting an application, first find out which AppleScript commands it supports. The scripter also has to know which of the target application’s objects, such as files, paragraphs, or database records, can be manipulated by a script. You can accomplish this task by selecting the program from Script Editor’s File → Open Dictionary menu command. This command displays the dialog box depicted in Figure 2-3. Figure 2-4 shows what the same dialog box looks like in Mac OS X. Just choose the application icon of the program that you want to examine to view its dictionary in a dictionary window.
You can open a program’s dictionary by dragging the program’s icon in the Finder to the Script Editor’s icon.
The application’s dictionary specifically lists the sets, or suites, of script commands and classes that the program supports (for example, the Standard Suite, AppleScript suite, or Text suite). Figure 2-5 shows the Finder’s dictionary window in OS 9. The left panel of the dictionary window lists the application’s commands in plain text and its classes in italics. Remember that commands are the messages or Apple events that a script sends an application in order to get it to do something (e.g., sleep). Classes or objects are the things that a script may try to change or get information about (e.g., a file or folder).
If a system application, extension, or control panel does not show up in their folder when you use File → Open Dictionary, then they do not have a dictionary; they are minimally scriptable or not scriptable at all. Some control panels in OS 9, for instance, do not have a dictionary but respond to a “run” AppleScript command (such as Energy Saver). In Mac OS X, for example, if the application icon is dimmed in the Open Dictionary dialog window, then the app does not (yet) have a viewable dictionary .