• 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: Sending a list of path strings to the Finder via Scripting Bridge
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending a list of path strings to the Finder via Scripting Bridge


  • Subject: Re: Sending a list of path strings to the Finder via Scripting Bridge
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Sat, 26 May 2012 13:19:18 -0500

On Fri, May 25, 2012 at 1:56 AM, Peter <email@hidden> wrote:
> I'd like to reveal/select multiple items in the Finder.
> NSWorkspace only handles single files as in
>
>            [[NSWorkspace sharedWorkspace] selectFile:currentFilePath
>                             inFileViewerRootedAtPath:currentFilePath];
>
> I searched Google and tried to pick up every scrap of information on the Scripting Bridge but I could not find anything about sending a LIST of paths.

If you want an example of some very dark magic, here's some code that
constructs an Apple Event and sends it to the Finder:

https://uofi.box.com/s/91ef71641b6eeffdfc29

I started out with MoreAppleEvents sample code, ripped out everything
that didn't make it to 64bit (bunch of FSSpec stuff and IconSuites),
then wrote a MoreFESetSelection() function because MoreAppleEvents
didn't think to include one.

It sends a kAESetData event to Finder for the pSelection property. It
passes the files in as a list of FSRefs.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Sending a list of path strings to the Finder via Scripting Bridge (From: Peter <email@hidden>)

  • Prev by Date: Re: DisplayName not shown
  • Next by Date: Re: Sending a list of path strings to the Finder via Scripting Bridge
  • Previous by thread: Re: Sending a list of path strings to the Finder via Scripting Bridge
  • Next by thread: Censoring pasted text
  • Index(es):
    • Date
    • Thread