Apple AppleScript Finder Guide User Manual
Page 47

C H A P T E R 2
Finder Objects
Object Class Definitions
35
File (page 61)
Folder (page 63)
Font File (page 65)
Font Suitcase (page 66)
Information Window (page 69)
Item (page 73)
Sharable Container (page 79)
Sharing Window (page 85)
Sound File (page 88)
Suitcase (page 90)
Trash-Object (page 91)
Window (page 95)
Elements of any of these classes can be identified by name or by number. With
the exception of the desktop and window objects such as container windows
and information windows, an element of the Finder can also be identified by
an AppleScript alias record—that is, a representation of an object, much like
an alias icon on the desktop, that identifies the object. For example, both these
statements refer to the same file:
alias "Hard Disk:MyFile"
file "MyFile" of disk "Hard Disk"
In most cases the Finder can accept a reference like the first example, but you
can’t use a Finder reference like the second example outside of a Tell statement
addressed to the Finder. This book describes how to use Finder references. For
information about AppleScript references to alias records, files, applications,
machines, and zones, see the AppleScript Language Guide.
Objects of class Application File, Disk, and Folder can also be identified by ID.
The ID in each case consists of the application file’s creator type (as a string),
the disk’s ID, and the folder’s folder ID, respectively. For example, this state-
ment identifies the startup disk:
disk ID -1
-—result: startup disk of application "Finder"