Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Another way to create Finder-clickable shell scripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way to create Finder-clickable shell scripts
Authored by: peterhil on Jul 31, '03 04:49:14AM

Neat hint!

But to make it work, I had to make an Info.plist file in the bundle, which must contain the usual xml headers plus the following key at minimum:

	<key>CFBundleExecutable</key>
	<string>foo</string>

Apple's developer documentation about keys used in the bundles instruct not to use a file name extension for the actual program -- and after dropping the extension the shell script shows as an application inside the bundle too.

I have been looking for a way to make a "droplet" from shell script, so I could drop files into the shell script which would get the dropped files as arguments.

Editing the CFBundleDocumentTypes key in Info.plist didn't seem to achieve this. Does anyone know how this could be done?

This might be a great way to package Python programs too!



[ Reply to This | # ]
AppleScript droplets
Authored by: saint.duo on Jul 31, '03 11:34:43AM
I use applescript to accomplish this. Something along the lines of:
on open myList
   repeat for each myItem
      do shell script "PathToMyShellScript" & " " & myItem
   end repeat
end open
The code may be a little off, as I'm doing this for memory, but the idea works. I use it in my UnButton app, which you can get the source code for at http://www.freefallsoftware.com/products.html

---
--
duo

[ Reply to This | # ]