Language Guide

CHAPTER 5
Objects and References
136 Reference Forms
Range 5
The Range reference form specifies a series of objects of the same class
in the same container. You can specify the objects with a pair of indexes
(such as words 12 thru 24) or with a pair of boundary objects (such as
words from paragraph 3 to paragraph 5).
SYNTAX
every className from boundaryReference1 to boundaryReference2
pluralClassName from boundaryReference1 to boundaryReference2
className startIndex ( thru | through ) stopIndex
pluralclassName startIndex ( thru | through ) stopIndex
where
className is a singular class ID (such as word or paragraph).
pluralclassName is the plural class identifier defined by AppleScript or an
application (such as words or paragraphs).
boundaryReference1 and boundaryReference2 are references to objects that bound
the range. The range includes the boundary objects. You can use the reserved
word beginning in place of boundaryReference1 to indicate the position before
the first object of the container. Similarly, you can use the reserved word end
in place of boundaryReference2 to indicate the position after the last object in
the container.
startIndex and stopIndex are the indexes of the first and last object of the range
(such as 1 and 10 in words 1 thru 10).
VALUE
The value of a Range reference is a list of the objects in the range. If the
specified container does not contain all of the objects specified in the range, an
error is returned. For example, the following reference results in an error.
paragraphs 1 thru 3 of {1, 2, 3}
--results in an error