Language Guide
CHAPTER 7
Control Statements
Considering and Ignoring Statements 213
Considering and Ignoring Statements 7
Considering statements allow you to control the way AppleScript executes
operations and commands by listing specific characteristics, called attributes,
to be taken into account as the operations and commands are executed.
Ignoring statements work the same way, except that you list specific attributes
to be ignored.
The attributes you can use include
■ case, white space, and others that affect string comparisons
■ an attribute called application responses that controls whether or not
AppleScript waits for responses from commands sent to applications
Here’s an example of a string comparison without a Considering statement:
"This" = "this"
--result: true
The value of the string comparison is true, because by default, AppleScript
does not distinguish uppercase from lowercase letters.
Here’s an example of the same comparison within a Considering statement:
considering case
"This" = "this"
end considering
--result: false
The Considering statement specifies that a particular attribute of strings—
their case—is to be used in comparisons. As a result the comparison
"This" = "this" is now false, because the uppercase “T” in "This"
does not match the lowercase “t” in "this".