Re: TechNote 2106
Re: TechNote 2106
- Subject: Re: TechNote 2106
- From: Chris Espinosa <email@hidden>
- Date: Wed, 3 Mar 2004 13:27:35 -0800
On Mar 3, 2004, at 12:47 PM, Brennan wrote:
I was really curious to see this
feet are webbed of every duck
--> {true, true, missing value}
The elegance of this form impressed me, but I haven't yet found an app
that will even compile an expression like this.
Example:
tell application "Finder"
(name contains "test") of every file of desktop --> wont compile
end tell
Am I missing something?
This assumes that "feet are webbed" is a Boolean property of the class
"duck". You probably read it as "feet" property being an enumeration
with "webbed" as a possible value, and "are" as a valid comparison
operator. Sadly, AppleScript doesn't support "are" as a comparison
operator, nor can you embed a comparison in an object specifier like
that, as you discovered in your Finder example.
The closest would be a whose clause:
tell application "Finder"
every file of desktop whose name contains "test"
end
which is roughly parallel to
every duck whose feet is webbed
Whose clauses, though, won't return 'missing value' in such a case,
which is the point of that example.
Chris (The Other Chris)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.