CutThe Cut command is a request to remove an object and put it on the Clipboard. If the Cut command includes a direct parameter, it removes the object specified in the direct parameter. If the command does not include a direct parameter, it removes the object in the current selection.
The Cut command has the same result as choosing the Cut menu item in the Scriptable Text Editor: the object that was cut replaces any objects that were previously on the Clipboard.
SYNTAXcut [ referenceToObject ]
- A reference to the object to be cut.
EXAMPLEBoth of the following statements cut the first paragraph of a document.
tell application "Scriptable Text Editor" set the selection to paragraph 1 of document "Test" cut end tell tell application "Scriptable Text Editor" cut paragraph 1 of document "Test" end tell
NOTESIf you do not specify a direct parameter and there is no selection to be cut, the Scriptable Text Editor does not change the contents of the Clipboard.
If you specify a direct parameter, it must be a reference to a single object. The Scriptable Text Editor cannot cut ranges of objects. For example, the following statement results in an error.
tell application "Scriptable Text Editor" cut words of paragraph 5 of front document end tell --result: error, because Cut can handle single objects only