Get Finder Selection from a non-ASOC app


I want to reproduce this:

tell application “Finder”
set MyFolderList to selection as list
end tell

How is it possible outside an applescript/ASOC application? Using finder.h? NSWorkspace? SBApplication? Using an applescript and launching it from inside the app?

A lot of doc, but I can’t find a way to get this done, that is, to obtain an NSArray containing the selected paths. Any ideas?


Executing an applescript from within an app, would be possible, but violate the sandboxing I think.

Maybe Finder supports plugin architecture and you could write a plugin for finder, which you could import data from?

I am not sure if that would work either, and come to think about it, I’d have a look into Quicksilvers source code, if that is available, that App, can at least grab a finder selection.


OK, I got it. I use Scripting Bridge framework.

Note that using Scripting Bridge gives a heck of a brake to an Objective-C application.