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: Andy Wylie <email@hidden>
- Date: Sat, 26 Oct 2002 11:53:15 +1300
on Fri, 25 Oct 2002 18:16:07 +0100 John Delacour wrote:
>
At 11:44 pm +0900 25/10/02, Gakuji Ohtori wrote:
>
>
>The folloiwng code generates an error (-1731):
>
>
>
> tell application "Finder" to get (items whose class is not disk) in
desktop
>
>
>
>Is this the expected result or is it simply a bug of Finder?
>
>
>
>I'm using Mac OS X 10.2.
>
>
>
It doesn't work with this either, which would be the proper syntax:
>
'..get items in desktop whose class is not disk'
>
>
>
So, as far as I can see, you'll have to do this:
>
>
set ls to {}
>
tell app "Finder"
>
repeat with f in (get desktop's items)
>
if f's class is not disk then set end of ls to contents of f
>
end
>
end
>
return ls
>
>
'description' used to be a good desktop filter...
tell application "Finder"
get desktop's items whose description does not contain " disk"
end tell
_____________________________ Andy
_______________________________________________
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.