|
|
Another way to create Finder-clickable shell scripts
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!
AppleScript droplets
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 openThe 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 --- |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|