Automator can be used to create an application "wrapper" around a script, so that you can launch your script like any other application (and it won't spawn a superfluous Terminal window in the process).
- Open Automator, and create a new application type workflow.
- Add a Run Shell Script action, and enter your script into the text field.
- If your script takes input (such as files), make sure the Pass input setting on the action is set appropriately (either arguments, if you use
$1, $2, etc.
or stdin). Otherwise you can ignore this setting.
- Save the workflow to your location of choice, then drop the resulting file in the Dock.
Answer for my own question...
I mistakenly changed the default application for opening folders (!) away from Finder to an application of my own creation. I didn't know this was even possible! Needless to say this had some weird side effects, like the problem I originally described. But I figured it out – I mucked up my system with an erroneous QuickSilver command.
I'm always creating dated folders, so I created an Automator app that, given the current folder, would create a folder within using the date as the name.
When teamed with QuickSilver's "Current Selection" trigger, the app becomes useful. I can call my "create-dated-folder.app" from the current folder, using "Open with..." in Quicksilver's second pane, and my app in the third. Works great.
My mistake was, instead of "Open with", I once chose "Always Open With", which changed system settings I didn't know existed – it changed the default application for the "public.folder" UTI from Finder to my Automator app. Then the weirdness began, like if I chose "Open Examples Folder" from Automator's help menu, my app would be invoked. I really had no idea what was going on!
Brilliant tip from to Tetsujin who suggested RCDefaultApp would be worth investigating.
Best Answer
You can move the dock's location and size by going to System Preferences > Dock. Rather than keeping the dock at the bottom, where the mouse needs to be often, move it to either the right or left sides of the screen.
I auto-hide the dock on the left side of the screen (I'm on a 13" MacBook Air, so my vertical space is limited too). You could also use @VxJasonxV's suggestion of removing the apps from the dock. Most of the programs I launch are via spotlight (the ⌘+Space shortcut is very useful). And the last trick I use is BetterTouchTool. I bound five-finger-click to ⌘+Q, which makes it very easy to quit applications, but not so easy that it accidentally quits applications I didn't mean to quit.