Language Guide
CHAPTER 5
Objects and References
References to Files and Applications 143
Because each test is a Boolean expression, it can also include the Boolean
operator Not. For example, the reference
words whose length > 10 and not it contains "M"
refers to only those words containing more than ten characters and not
containing the letter “M.” The expression it contains "M" is a valid
Boolean expression, and applying the Boolean Not operator to it, as in
not (it contains "M")
inverts the value of the expression, so that a true value becomes false, and a
false value becomes true.
A more elegant way to apply the Boolean Not operator to the expression
it contains "M" is
it doesn't contain "M"
The expression it doesn't contain "M" is a synonym for the expression
not (it contains "M"). AppleScript supports synonyms for many of its
operators. Using a synonym doesn’t change the meaning of an expression, but
it can make the expression easier to read. Operators and synonyms are listed in
Chapter 6, “Expressions.”
References to Files and Applications 5
Several application commands and scripting addition commands allow you to
use the Name reference form to identify a file or an application as a parameter,
including applications on remote machines connected to an AppleTalk network.
AppleScript treats references to file, alias, application, machine, and zone objects
differently from other references that use the Name reference form. AppleScript
takes care of locating these objects, but uses the equivalent definitions in an
application’s dictionary (if any) to determine their characteristics.