Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 3 - Appendixes
Appendix B - Scriptable Text Editor Dictionary


Scriptable Text Editor Commands

This section defines the commands that are understood by the Scriptable Text Editor and its objects.

The Scriptable Text Editor supports most of the standard application commands listed in Chapter 4, "Commands." As is true for most scriptable applications,
the Scriptable Text Editor's definitions for some of these commands differ slightly from the standard definitions. Table B-1 summarizes the differences between the defined behavior of the standard commands and the Scriptable Text Editor behavior.
Variations from standard behavior in Scriptable Text Editor versions of standard application commands
Standard
application command
Scriptable Text Editor version
CloseIdentical to the standard version defined on page 86.
CopyBehaves like the standard version defined on page 88, except that the direct parameter must be a single object. The Scriptable Text Editor cannot copy a range of objects.
CountIdentical to the standard version defined on page 91.
Data SizeBehaves like the standard version defined on page 96, except that the Scriptable Text Editor returns the size of text objects as a data class that includes writing code information. The writing code information adds 4 bytes to the data size.
DeleteIdentical to the standard version defined on page 98.
DuplicateBehaves like the standard version defined on page 98, except that the direct parameter must be a single object. The Scriptable Text Editor cannot duplicate a range of objects.
ExistsIdentical to the standard version defined on page 99.
GetIdentical to the standard version defined on page 100.
 
MakeBehaves like the standard version defined on page 104, with some exceptions. The default location for new text objects is the current selection; the default location for new document and window objects is in front of other Scriptable Text Editor windows.

When you create text objects with the Make command, the Scriptable Text Editor automatically adds the appropriate delimiters before or after the new text objects, depending on the script code for the new text, the script code for the surrounding text, and, in the case of text items, the value of the Text Item Delimiters property. Do not include delimiters in the with data parameter.

MoveBehaves like the standard version defined on page 106, except that the direct parameter must be a single object. The Scriptable Text Editor cannot move a range of objects.
OpenBehaves like the standard version defined on page 107, except that the Scriptable Text Editor can only open text files or its own files.
If you use the Open command to open a file of type "TEXT", the Scriptable Text Editor automatically converts the file to a Scriptable Text Editor file and appends ".s" to the end of the filename.
PrintIdentical to the standard version defined on page 108.
QuitIdentical to the standard version defined on page 109.
RunIdentical to the standard version defined on page 110.
SaveBehaves like the standard version defined on page 112, except that it has an optional parameter that allows you to save Scriptable Text Editor files as text files.

The direct parameter of the Save command must be a single object. The Scriptable Text Editor cannot save a range of objects.

SetIdentical to the standard version defined on page 113.

Table B-2 summarizes the commands other than the standard application commands that are supported by the Scriptable Text Editor.
Other Scriptable Text Editor commands
CommandDescription
CutRemoves an object and puts it on the Clipboard
PasteCopies the object or objects on the Clipboard to the current selection
RevertReplaces a document with the most recently saved version
SelectSelects an object or document

The sections that follow describe both the commands listed in Table B-1 that differ from the standard versions and the commands listed in Table B-2.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996