PDA

View Full Version : Bash scripts and drag-and-drop. Can it be done?




Stu L Tissimus
Jan 25, 2008, 07:19 AM
Let's say I have a command that takes a single parameter. For example:

cp <parameter> ~/Desktop

(That's not the command, but it's the simplest thing I can think of.) Basically, what I'd like to do is be able to drag a file over an application/script in my dock and let said app/script use the filepath as a parameter to a bash script. Any ideas?



larkost
Jan 26, 2008, 05:31 PM
The best way is going to be wrapping this in an AppleScript Drop-Script. This is relatively easy thing to do.