Re: whose class is folder...
Re: whose class is folder...
- Subject: Re: whose class is folder...
- From: Jean-Christophe Helary <email@hidden>
- Date: Sat, 07 Apr 2018 09:16:52 +0900
> On Apr 7, 2018, at 8:48, Shane Stanley <email@hidden> wrote:
>
>> but if I do
>>
>> tell application "Finder"
>> item of (selection as list) whose class is folder
>> end tell
>>
>> I get a "can't get item of {...}" -1,728 error...
>
> I suspect you mean "item 1 of..." or "items of...".
correct.
> Whose clauses filter collections of elements. The selection property returns
> a list, but is not itself a collection.
And the manual indeed says:
> The filter form specifies application objects only. It cannot be used to
> filter the AppleScript objects list (page 112), record (page 118), or text
> (page 124)
...
But I tried the same with selection only and I don't get any closer.
I guess I must transform the contents of selection into a "collection" of
Finder items, but I have no idea where to start from.
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden