Language Guide

CHAPTER 6
Expressions
Operations 171
The expression x = y in the following statement is false, because the
containers are different.
tell document "Intro" of application
"Scriptable Text Editor"
set x to a reference to word 1 of paragraph 1
set y to a reference to word 1
x = y
end tell
--result:false
When you use references in expressions without the A Reference To operator,
the values of the objects specified in the references are used to evaluate the
expressions. For example, the result of the following expression is true if both
documents begin with the same word.
word 1 of document "Report" = word 1 document "Intro"
STRING
Two strings are equal if they are both the same series of characters. They are
not equal if they are different series of characters. AppleScript compares strings
character by character. It does not distinguish uppercase from lowercase letters
unless you use a Considering statement to consider the case attribute. For
example, the following expression is true.
"DUMPtruck" is equal to "dumptruck"
AppleScript considers all characters and punctuation, including spaces, tabs,
return characters, diacritical marks, hyphens, periods, commas, question
marks, semicolons, colons, exclamation points, backslash characters, and single
and double quotation marks in string comparisons. AppleScript ignores style in
string comparisons.