Language Guide

CHAPTER 6
Expressions
158 AppleScript Properties
Finally, recompile the script. (You can do this by making an insignificant
change, such as adding a space at the end of a line, and clicking the Check
Syntax button.) The value of theCount is set to the initial value in the
property definition. The Display Dialog command reports a value of 1.
Scope of Script Properties 6
Like the scope of a variable, the scope of a script property determines where
else in a script you may refer to the same property ID. The scope of a property
in turn depends on where you declare it.
You can declare a property at the top level of a script or at the top level of a
script object. If you declare it at the top level of a script, a property identifier is
visible throughout the script. If you declare it at the top level of a script object,
a property identifier is visible only within that script object. After declaring a
property, you can use the same identifier as a separate variable only if you first
declare it as a local variable.
For detailed information and examples of the use of properties in subroutines,
see “Scope of Script Variables and Properties,” which begins on page 252.
AppleScript Properties 0
You can use the global variable AppleScript to get properties of AppleScript
itself rather than properties of the current target. You can refer to this global
variable from any part of any script. Currently, the Text Item Delimiters
property is the only AppleScript property available.
Text Item Delimiters 6
The Text Item Delimiters property consists of a list of strings used as delimiters
by AppleScript when it coerces lists to strings or gets text items from strings.
You can get and set the current value of AppleScript’s Text Item Delimiters.
Normally, AppleScript doesn’t use any delimiters. For example, the script
{"bread", "milk", "butter", 10.45} as string