A datatype
is a classification of a value; every value is of one datatype or another. This is what AppleScript calls a class
. For example, string
is a datatype, integer
is a datatype, and so forth. AppleScript provides a number of native
datatypes; this chapter describes them.
Scriptable applications can extend the language through additional classes. For example, the Finder implements a folder
class. But such additional classes are confined to the application
that defines them; a value returned by a scriptable application must be either a reference to an object belonging to that application or one of AppleScript's native datatypes
.
Script objects, handlers, and references are not dealt with in this chapter (see respectively Chapters 8, 9, and 12). The details of coercion, the conversion of certain values from one datatype to another, will be explained in Chapters 14 and 15.
The application class is used mainly to specify a target. This, in effect, is the primary act of AppleScript programming. You specify a target so that you can send messages to it, and sending messages to an application is the purpose of AppleScript.
You specify an application using an object string specifier
—the word application
followed by a string representing the application's name or (colon-delimited) pathname. An abbreviation for application
is app
. For further details on how to target an application using an application specifier, see "Local Applications" in Chapter 23.