Finder selection
Finder selection
- Subject: Finder selection
- From: Brennan <email@hidden>
- Date: Mon, 14 Mar 2005 11:08:46 +0100
The Finder selection is a strange beast. I wish to use it often, and then
am confounded by the inscrutable results.
It appears to be a list, but isn't. I've learned that, regardless of how
many items are selected:
(count selection) -- always returns 0
(files of selection) -- always returns {}
(items of selection) -- always returns {}
Presumably this is because 'selection' does not have a class defined. Is
this just something which has not been filled in yet. It certainly seems
like a shortcoming.
'selection' can be coerced to list, but one irritating consequence of this
is that we can't then use the filter reference form to extract things from
it, e.g. there is no way to do something like this:
(items of selection whose name contains "x")
Finder items do not have a 'selected' property either, which might have
been a viable workaround:
(items of Finder window 1 whose selected is true and name contains "x")
Do other people use the Finder selection? Have you learned anything
useful?
Brennan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden