62
C H A P T E R 7
Control Statements
270
Considering and Ignoring Statements
5/5/99 ã Apple Computer, Inc.
AppleScript does not wait for responses from application commands before
proceeding to the next statement, and ignores any results or error messages that
are returned. Results and error messages from AppleScript commands,
scripting additions, and expressions are not affected by the
application
responses
attribute.
case
: In string comparisons, uppercase letters are not distinguished from
lowercase letters. If this attribute is considered, uppercase letters are
distinguished from lowercase letters. See “Greater Than, Less Than” (page 224)
for a description of how AppleScript sorts letters, punctuation, and other
symbols.
diacriticals
: Diacritical marks (such as ´, `, ˆ, ¨, and ˜) are considered in string
comparisons. If this attribute is ignored,
"résumé"
is considered equal to
"resume"
, and so on. See “Greater Than, Less Than” (page 224) for a description
of how AppleScript sorts letters with diacritical marks.
expansion
: In string comparisons, AppleScript treats the characters æ, Æ, œ,
and Œ as identical to the character pairs ae, AE, oe, and OE, respectively. If this
attribute is ignored, AppleScript treats these characters like single characters;
for example æ would be considered not equal to the character pair ae.
hyphens
: In string comparisons, hyphenated words are considered different
from their nonhyphenated counterparts. If this attribute is ignored, the strings
are compared as if any hyphens were not present; for example
"anti-war"
would be considered equal to
"antiwar"
.
punctuation
: The punctuation marks (. , ? : ; ! \ ' " `) are considered in string
comparisons. If this attribute is ignored, the strings are compared as if these
punctuation marks were not present; for example
"This!"
would be considered
equal to
"This"
.
white space
: Spaces, tab characters, and return characters are considered in
string comparisons. If this attribute is ignored, the strings are compared as if
these characters were not present; for example
"Brick house"
would be
considered equal to
"Brickhouse"
.
EXAMPLES
"BOB" comes before "bob" --result: false
considering case
"BOB" comes before "bob" --result: true
end considering