Photo Singularity #5


AppleScript Applications – Hiding the dock icon

AppleScript is useful for all kinds of little tasks. If you’ve created one that you run fairly often, but do not want it to appear in the dock, there is an easy fix for that.

First, save the AppleScript as an Application Bundle. As a side note, saving as an Application creates a Power-PC application that will launch slower on Intel machines. An Application Bundle creates a Universal Binary which will launch faster and is required anyway to hide the icon. See this Mac OS X Hints article.

Second, you must modify the applications Info.plist file. This can be found by right-clicking the app and selecting Show Package Contents. The file can be found in the Contents folder. Add the lines

just above the line that reads as <key>WindowState</key>. Save and you’re done.

Another option is to download Icon Hider and drag’n’drop your application to it. I included the code, so if you wish to see it simply drag’n’drop the app to the Script Editor. Beware, though, after editing a plist file with Icon Hider the plist file will not appear correctly in TextEdit. It works fine though in Mac OS X 10.5.