Language Guide

APPENDIX B
Scriptable Text Editor Dictionary
314 About Text Objects
Elements of Text Objects B
Each of the text object classes can contain any of the other text object classes as
elements. For example, a word can also be a paragraph. A word object can
contain character, word, and text item elements.
Classes of text objects are distinguished from each other by the way their
boundaries, or delimiters, are defined. Because of this, the same text can be
viewed as a collection of character elements, word elements, paragraph
elements, or text item elements.
In addition to paragraph, word, character, and text item elements, all text
objects can contain elements that belong to the class Text. An object belonging
to class text is a series of contiguous characters. In any text object, the elements
of class text are all of the possible series of contiguous characters contained
within the object. The most common way to use an element of class Text is to
specify the contiguous characters in a range of text objects.
For example, the following reference specifies all the characters, including
spaces, from the beginning of the fifth word to the end of the twenty-fifth word.
text from word 5 to word 25
In contrast, the following reference specifies a list of words, with no information
about spaces or punctuation between words.
word 5 thru 25
Special Properties of Scriptable Text Editor Text Objects B
Like most scriptable applications, the Scriptable Text Editor supports standard
groups, or suites, of AppleScript objects and commands. Different applications
of the same type have many of the same objects and commands in their
dictionaries. For example, most text-processing applications have paragraph
objects, word objects, character objects, text item objects, and objects of class
text. For the most part, these objects have the same properties in different
applications.
Sometimes scriptable applications add properties to standard objects that are
not included in the standard suites. In the Scriptable Text Editor, each of the