• 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: command line tool: processing files dropped on it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: command line tool: processing files dropped on it?


  • Subject: Re: command line tool: processing files dropped on it?
  • From: "Herb Petschauer" <email@hidden>
  • Date: Wed, 1 Oct 2008 11:03:34 -0700

2008/10/1 Sherm Pendley <email@hidden>:
> 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--
>
> --

Thought I'd also mention,
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/ConfigFiles.html>

You can embed a plist into a binary file so you might be able to get
drag and drop that way.  I've done the embedding part but never had
the need for drag and drop onto a tool (and honestly, no Mac user is
going to drag and drop onto a unix executable, wrap it into a GUI app
with a nice icon and a simple UI - something like StuffIt Expander
perhaps).

IMHO (of course)

Cheers,
-H.
_______________________________________________

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: 
 >command line tool: processing files dropped on it? (From: "Barrie Green" <email@hidden>)
 >Re: command line tool: processing files dropped on it? (From: "Sherm Pendley" <email@hidden>)

  • Prev by Date: Re: command line tool: processing files dropped on it?
  • Next by Date: Re: Play Playlist in iTunes
  • Previous by thread: Re: command line tool: processing files dropped on it?
  • Next by thread: Re: command line tool: processing files dropped on it?
  • Index(es):
    • Date
    • Thread