Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 2 - Finder Objects / Using Object Class Definitions


Default Value Class Returned

In most scriptable applications, each object has a value that you can obtain simply by referring to the object in a script. For example, the value of a paragraph object in a word-processing application is a string that includes
style and font information.

Unlike other scriptable applications, the Finder can control only the representation of its objects within windows and the properties it defines for them; it can't retrieve or alter text in a text file, for example. Therefore, the value returned for most Finder objects is a reference to the object, not the object's data.

For example, this script returns a reference to the file MyFile, not the contents of the file:

tell application "Finder"
   get file "MyFile" of startup disk
end tell

--result: file "MyFile" of startup disk of application "Finder"

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996