Re: filtering a list of items with Finder
Re: filtering a list of items with Finder
- Subject: Re: filtering a list of items with Finder
- From: "John S. Baltutis" <email@hidden>
- Date: Sun, 27 Oct 2002 00:21:48 -0700
On 10/26/02, has <email@hidden> wrote:
>
>
Gakuji Ohtori wrote:
>
>
>> get items of desktop whose kind is not "disk"
>
>>
>
>> This works under OS9, but it's too late at night for yet another reboot
>
>> into OS10 to see if it works there.
>
>
>
>It works but the kind property varies between languages.
>
>
Busted. Ah well. (Lucky for me I brought my trusty paranoia along; had a
>
feeling this'd be the case.) Thanks for confirming.
>
>
>
And Shane Stanley wrote:
>
>
>Have you tried "...kind is not kind of startup disk"?
>
>
Sounds like it'd work. Yet having to jump through hoops like this is quite
>
ridiculous. Why in the world can't the Finder just filter by class? Crazy.
FWIW
Quick check on 9.2.2 w/AS 1.8.3
Case 1a:
tell application "Finder"
get items of desktop whose kind is kind of startup disk
end tell
--> {startup disk, disk "John's X Mac", disk "Baseline", disk "Images",
disk "Documents", disk "John's Classic Mac", disk "John's JAG Mac", disk
"Applications", disk "Extras", disk "Finances ZIP", disk "Net Cache"}
Case 1b:
tell application "Finder"
get items of desktop whose kind is "disk"
end tell
--> {startup disk, disk "John's X Mac", disk "Baseline", disk "Images",
disk "Documents", disk "John's Classic Mac", disk "John's JAG Mac", disk
"Applications", disk "Extras", disk "Finances ZIP", disk "Net Cache"}
Case 2:
tell application "Finder"
get items of desktop whose kind is not kind of startup disk
end tell
--> {}
Case 3:
tell application "Finder"
get every item of desktop whose kind is not "disk"
end tell
--> {trash, file " Apple OSX dmg ", file "Script Editor"<snip every other
thing on desktop that's not a disk>}
Then with X 10.2.1 w/AS 1.9
Case 1a:
tell application "Finder"
get items of desktop whose kind is kind of startup disk
end tell
--> Finder got an error: Can't get every item of desktop whose kind = kind
of startup disk.
Case 1b:
tell application "Finder"
get items of desktop whose kind is "disk"
end tell
--> {}
Case 2:
tell application "Finder"
get items of desktop whose kind is not kind of startup disk
end tell
--> Finder got an error: Can't get every item of desktop whose kind kind
of startup disk.
Case 3:
tell application "Finder"
get every item of desktop whose kind is not "disk"
end tell
--> {startup disk, disk "John's X Mac", disk "Baseline", disk "John's 9
Mac", disk "Images", disk "Documents", disk "John's Classic Mac", disk
"Applications", disk "Extras", disk "Finances ZIP", alias file " Apple OSX
dmg" of desktop,<snip every other thing on desktop that's not a disk>} I.e,
everything on desktop.
Not consistent at all.
_______________________________________________
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.