On Fri, May 25, 2012 at 1:56 AM, Peter <magn...@web.de> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to