Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference
Chapter 5 - Objects and References / Reference Forms


The ID reference form specifies an object by the value of its ID property. You can use this reference form only for objects that have an ID property.

className id IDvalue 

className is the class identifier for the specified object.

IDvalue is the value of the object's ID property.

document ID 9096
window id 777
Although ID properties are most often integers, an ID property can belong
to any class. An application that includes ID properties must guarantee that
the IDs are unique within a container. Some applications may also provide additional guarantees, such as ensuring the uniqueness of an ID among
all objects.

The value of an ID property is not modifiable. It does not change even if the object is moved within the container. This allows you to save an object's ID and use it to refer to the object for as long as the object exists.

Applications are not required to support ID properties. To find out if or how an application uses ID properties, see the documentation for the application.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996