On May 17, 2014, at 6:26 PM, Kevin Meaney <[email protected]> wrote: > I think an applescript droplet, using the "on open" call which then calls "do > shell script" with the path to your command and the file that is dropped on > it. > > Kevin
>> You have to create the right kind of Automator workflow for dropping files >> onto, then you have to select from a popup what to do with the input, then >> you write your script. > > Duh. Step 1.5, you add a "Run Shell Script" action to your workflow. > OK thanks — I am trying this and it almost works. It does run the script, but it is not passing the dropped filename as an argc/argv argument. The script just reports that it gets no arguments. I did set “Pass Input” on the “Run Shell Script” to “as arguments”, so it seems like it should work. Within Automator, you have to add a “Get Specified Finder Items” action before the script, if you want to run it within Automator. I tried that, and it just doesn’t seem to pass the filename as an argument. Maybe it is actually passing the *contents* of the dropped file, instead of just its filename? But my script is reporting no arguments besides the script name. Bob _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
