Objects

    Your script must specify an object for each command. An object might be a window, an option in a dialog box, or the program itself. For example, a file is an object in the Finder.

    AppleScript, the scripting additions, and programs define the objects you can use.

    To see the definition of an object, you need to open the dictionary of the application that contains the object and select the object in the list. For example, you can look at the objects in the Finder dictionary.

    Open the Finder dictionary for me.

    The items in italics are objects. Click one of these to see its definition.

    An object definition includes these items:
    Name: the word or words you use to specify the object in a script
    Class: the type of the object
    Class determines certain characteristics of objects that belong to the class, such as the commands you can use to control the object.
    Properties: the characteristics of the object
    For example, "name" might be a property of a window object. Each property has a unique name and a single value.
    Some objects include "[r/o]," which means the property is read-only. You can use the Get command to use a read-only property in a script, but you cannot set the property.

    It addition to its name, class, and properties, an object definition may include
    a plural form
    one or more elements, which are objects contained by the object

 


Table of contents