The Apple Event Object Model defines a conceptual organizational structure for objects in an application which are of concern to a scripter.
An object is specified by four pieces of information:
- Class -- the class of which the object is an instance.
- Key form -- how the object is identified, e.g. by name, index, unique id, etc.
- Key data -- a value used as a key to identify an object.
- Container -- the context in which to apply the key.
An object specifier can be thought of as a record with the four data above as fields. The application itself is the root object, and an exception to the previous rule. The application is unique, and its object specifier is simply the null value. Object specifiers can be nested (so one object specifier's container is another object specifier).
Example, using AppleScript syntax:
document 1 -- class: document, form: absolute position, data: 1 (integer), container: (the application)
last line of document 1 -- class: line, form: absolute position, data: last (absolute ordinal), container: { class: document, form: absolute position, data: 1 (integer), container: (the application) }