Re: command line tool: processing files dropped on it?
Re: command line tool: processing files dropped on it?
- Subject: Re: command line tool: processing files dropped on it?
- From: "Sherm Pendley" <email@hidden>
- Date: Wed, 1 Oct 2008 13:34:14 -0400
On Wed, Oct 1, 2008 at 6:46 AM, Barrie Green <email@hidden> wrote:
> hi all,
>
> Hopefully someone can point me in the right direction.
>
> I have a command line tool, written in c++, that I use on my windows
> machine, which allows me to drop files onto it. Windows ensures the
> tool receives the paths of the files dropped through the argc/argv
> arguments in main.
>
> I have ported my tool over to OS X using xcode and created a command
> line tool and all my tests work OK.
>
> But I'm hampered by the fact that finder won't let me drag n drop
> files onto my tool! I can't even use it from the "Open With" Context
> menu in finder.
>
> I'm sure i've seen other (OS X) tools process files like this,
> although I can't remember which.
If you've seen something that accepts dropped files, it wasn't a
command-line tool. On Mac OS X, only GUI apps will accept dropped files.
> Is there a way of getting this to work?
Wil Sanchez' DropScript comes to mind. It creates a "wrapper" app that
accepts dropped files, then runs your command-line tool with the paths of
the dropped files passed as arguments. Despite its name, it works with any
command-line tool, not just scripts.
<http://www.wsanchez.net/software/>
sherm--
--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________
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