Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exists command (was: AppleScript-Users Digest, Vol 4, Issue 2)




On 3 Jan 2007, at 10:03, Axel Luttgens wrote:

On 2/01/07 21:17, Barry Wainwright wrote:

[...]

'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

----------------

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/applescript-users/email@hidden Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Re: AppleScript-Users Digest, Vol 4, Issue 2 (From: Barry Wainwright <email@hidden>)
 >Re: AppleScript-Users Digest, Vol 4, Issue 2 (From: Axel Luttgens <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.