Every scriptable application on your computer contains a scripting dictionary that details all of the scriptable objects and commands that it understands and supports. To access the dictionary for the Numbers application, do the following:
DO THIS ►Launch the AppleScript Editor application from the Utilities folder (found in the Applications folder). From the AppleScript Editor’s File menu, select the menu item titled: Open Dictionary… (⇧⌘-O). The Open Dictionary dialog will appear. (⬇ see below )
The Open Dictionary dialog (⬆ see above ) displays all of the scriptable applications on your computer. The iWork applications will be in the displayed list.
DO THIS ►To open the Numbers scripting dictionary, select the Numbers application from the list of applications, and click the Choose button. (⬆ see above )
The Dictionary Viewer window displays an application’s scripting terminology. It shows the scripting commands, classes (scriptable objects), and their elements and properties, in a single window. The following callouts describe the various components of the Dictionary Viewer:
For your convenience, each of the sections on this iWork scripting website displays any relevant segment of the corresponding iWork application dictionary on the first page of the topic. For example, here is the definition for the Numbers table class, shown in the illustration above:
table n : A table in a sheet
contains cells, columns, ranges, rows; contained by sheets.
cell range ( range, r/o ) : The range describing every cell in the table.
column count ( integer ) : The number of columns in the table.
filtered ( boolean ) : Whether the table is currently filtered.
name ( text ) : The table’s name.
row count ( integer ) : The number of rows in the table.
selection range ( range ) : The cells currently selected in the table.
delete, exists, make, sort
The class (scriptable object) definitions contain (from the top down):
- The name of the class, and its definition
- An optional list of the elements (other classes) contained by the class. For example, a table contains columns, rows, cells, and ranges, and is itself contained by sheets.
- An optional list of the properties of the class. The name of each property is followed by a description (in parens) of the data type of its value, whether the property’s value is read-only (r/o), and a definition of the property. For example, the filtered property has a value that is a boolean (true or false), indicating whether or not the table has had filtering applied to it.
- A list of the commands (responds to) that can be used to target the class. There may be other relevant commands (verbs) that are not included in this list. For example, the commands get and set, which are used to retrieve and apply the value of the property, are an implied part the AppleScript language, and don’t usually appear in the responds to list.