• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: whose class is folder...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: whose class is folder...
      • From: Shane Stanley <email@hidden>
References: 
 >whose class is folder... (From: Jean-Christophe Helary <email@hidden>)
 >Re: whose class is folder... (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: whose class is folder...
  • Next by Date: Re: whose class is folder...
  • Previous by thread: Re: whose class is folder...
  • Next by thread: Re: whose class is folder...
  • Index(es):
    • Date
    • Thread