Exists application command
An Exists command is a request to determine whether the object specified by a reference exists.
SYNTAX
referenceToObject exists
exists referenceToObject
PARAMETER
- referenceToObject
- A reference to the object or objects to find.
Class: Reference
RESULT
If true, all of the objects referred to by referenceToObject exist. If false, one or more of the objects referred to by referenceToObject do not exist.
Class: Boolean
EXAMPLES
tell document "Tremendous" of app "Scriptable Text Editor"
if word 7 exists then
delete word 7
end if
end tell
tell application "Scriptable Text Editor"
if exists front document then
print front document
end if
end tell