Language Guide
APPENDIX B
Scriptable Text Editor Dictionary
326 Scriptable Text Editor Object Class Definitions
Text Series of characters contained in the document
Text Item Text items contained in the document (see “Elements of Text
Objects” on page 314)
Word Words contained in the document
COMMANDS HANDLED
Close, Copy, Count, Delete, Duplicate, Exists, Get, Make, Move, Print, Revert,
Save, Select, Set
DEFAULT VALUE CLASS RETURNED
None; use Contents property to get the data of a document.
EXAMPLE
tell document "Colossal" of app "Scriptable Text Editor"
delete paragraphs 1 thru 10
end tell
NOTES
The window and document object classes can be used interchangeably. This
is because each open document has a window, whose elements and properties
are always the same as those of its document. For example, if the first open
document is named Giant, the first window is also named Giant. A Scriptable
Text Editor document and its window contain the same text elements, so
references to text elements in a document and its window can be used
interchangeably. For example, word 1 of document "Giant" and word
1 of window "Giant" refer to the same word.
Both the Bounds and Position properties are specified in terms of points on the
display. The Position property contains a single point: the upper-left corner of
the window’s content region (the portion of the window within the “window
frame” made up of the title bar and scroll bars). The Bounds property contains
two points: the upper-left corner of the content region followed by the
lower-right corner. In AppleScript, points are specified by pairs of integers
known as coordinates. The first coordinate in the pair, known as the
x-coordinate, specifies the distance from the left edge of the display to the