'exists' is actually a command from standard additions, I'm using
it like a
property of the window to emphasise this point. More common would
be to use
a construct like 'if window 1 exists', or 'if exists window 1'.
[...]
Just to avoid any ambiguity, I would like to correct a typo in the
above.
'exists' is a Finder command, not a Standard Additions one.
Yeah, I noticed that, too, Axel. But just to avoid any ambiguity,
'exists' is actually a general application command that determines
whether the object specified by a reference exists. So it works in
Finder, as well as elsewhere. ;-)
For example:
----------------
tell application "TextEdit"
exists window 1
end tell