Application
The Application object class defines the characteristics of the Scriptable Text Editor application.PROPERTIES
Clipboard
- Information stored in the Clipboard. The Clipboard is an area in the computer's memory that functions as a holding place for information that is cut or copied. The Scriptable Text Editor uses the Clipboard that is shared by all applications.
Class: List of data objects (see "Notes" later in this section)
Modifiable? Yes
Frontmost
- A Boolean parameter that indicates if the application is the active application. If the value is
true
, the Scriptable Text Editor is the active application. If the value isfalse
, the Scriptable Text Editor is not the active application.
Class: Boolean
Modifiable? No
Name
- The name of the application.
Class: String
Modifiable? No
Selection
- The current selection. The object or objects in the selection are the ones that would be cut by a Cut command or copied by a Copy command. If no objects are selected, the value of this property is a reference to an insertion point object.
Class: Reference
Modifiable? Yes
Text Item Delimiters
The characters that are used to separate text item objects. By default, the value of this property is a single comma, {",
"} (see "Notes").
Class: List of text objects
Modifiable? Yes
Version
- The version of the Scriptable Text Editor.
Class: String
Modifiable? No
ELEMENT CLASSES
- document
- Scriptable Text Editor documents that are currently open (see "Notes").
- window
- Scriptable Text Editor windows that are currently open (see "Notes").
COMMANDS HANDLED
Open, Print, Quit, RunDEFAULT VALUE CLASS RETURNED
NoneEXAMPLES
tell application "Scriptable Text Editor" to quit cut the selection of application "Scriptable Text Editor"NOTES
The AppleScript English language dialect supports the abbreviationapp
for referring to objects of class application. For example, the following statements are equivalent:
cut the selection of application "Scriptable Text Editor" cut the selection of app "Scriptable Text Editor"The window and document element 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"
andword 1 of window
"Giant"
refer to the same word.Text item objects are series of contiguous characters that are separated from each other by special characters called delimiters. The Text Item Delimiters property of the Scriptable Text Editor application consists of a list of characters that can be used to separate text item objects. At startup the default value of the Scriptable Text Editor's Text Item Delimiters property is a single-item list that contains a comma: {"
,
"}. You can set this delimiter to a different value or add additional delimiters, but the new values are lost when the user quits the application. You may find it convenient to alter the Text Item Delimiters property temporarily if you are dealing with multilingual text or text formatted with other delimiters.The Clipboard property is a list of objects of class Data, but you can use the
As operator to get the Clipboard as a string, reference, or styled text. The Scriptable Text Editor coerces the data to the requested type, if possible.
tell application "Scriptable Text Editor" cut word 1 of front document get clipboard as string end tell --result: the first word of the document as a string