Language Guide
APPENDIX B
Scriptable Text Editor Dictionary
About Text Objects 315
text object classes—paragraph, word, character, text item, and text—includes
the following special properties:
■ The Length property specifies the number of characters in the object.
■ The Offset property specifies the offset, in characters, from the beginning of
a Scriptable Text Editor document to the first character of the text object. For
example, if a document begins with the words “We the people”, the offset of
the word “We” is 1 and the offset of the word “people” is 8.
Text Styles B
The text styles of Scriptable Text Editor text objects are defined by two
properties: Style and Uniform Styles:
■ The Style property specifies the styles of the text object. If the styles vary
within the object, the Style property specifies the style of the first character
of the object.
■ The Uniform Styles property specifies the styles that are the same for all the
characters in the text object.
The value of a Style or Uniform Styles property is a record with two properties:
On Styles and Off Styles. The On Styles property specifies styles that are “on,”
that is, that apply to the text object. The Off Styles property specifies styles that
are “off,” that is, that do not apply to the text object. Both On Styles and Off
Styles are lists of constants that specify text styles. For the Scriptable Text
Editor, these constants are bold, italic, outline, underline, and shadow.
The following example shows the value of a Style property for a text object
whose characters are bold and underlined:
{On Styles:{bold, underline}, Off Styles:{italic, outline, shadow}}
The On Styles property lists the two styles (bold and underline) that apply
to the text object, while the Off Styles property lists the styles that do not apply
to the text object. Together, the On Styles and Off Styles properties of a Style
property include all of the text styles that the Scriptable Text Editor supports.
The Uniform Styles property specifies the styles that are uniform throughout a
text object, that is, that are the same for every character in a text object. The On
Styles property specifies the styles that apply to every character in the object.
The Off Styles property specifies styles that do not apply to any character in the