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
<key>LSUIElement</key>
<string>1</string>

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.

Advertisements

One Response to “AppleScript Applications – Hiding the dock icon”

  1. Reopen and Run – Unforswearing Says:

    […] use this information to hide the dock icon for the app and have it run completely in the […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: