This info is from this post over at MacOSXHints. In order for it to work, you need to save the script as an “Application Bundle”, not just an “Application”. Then right/control click the apps icon and choose “Show Package Contents”
Open the “Contents” folder. You’re gong to need to edit the “Info.plist” file.
If you have the Developer Tools installed, double clicking this file will open “Property List Editor”, you can then click the disclosure triangle by “Root”, select “Root” and click the “New Child” button, (if it says “New Sibling” then you haven’t selected “Root”). Name the property “NSUIElement”, set the class to “String”, and it’s value to “1”. Save the file.
If you don’t have the Developer Tools installed, then open the Info.plist file in TextEdit. You’ll need to add the key manually. I believe it can be placed anywhere after the opening
<dict>
but to be safe find the line WindowState
Now make a blank line BEFORE this line and add the following
<key>NSUIElement</key>
<string>1</string>
Save the file.
This will hide the applications Dock icon. You may need to log out/back in for the change to take effect.
This will hide the app completely so there’s no way to switch to it, you can’t access its menus, etc. If you need to quit the app, you can do so form “Activity Monitor” The process will be called “Applet” I believe. But you can fix this too. Read the rest to change the name the app identifies itlsef by in Activity Monitor (and top, etc.)
To get the apps name to show up in Activity Monitor you can do the following. Go to “Show Package Contents” for the app, navigate to the “Contents” folder. Open the “Info.plist” file again. This time you only need to edit a value. If you’re using Property List Editor, click the disclosure triangle by Root and find the property named “CFBundleExecutable”. Change the value for this property to whatever you want the name of your app to be in Activity Monitor. Save the file.
If using TextEdit, do a find for “CFBundleExecutable”, this will be surrounded by and tags. On the next line, between the and tags type the name you want to show up in Activity Monitor. Don’t leave spaces between your name and the > or < of the tags. Save the file.
Now, while still in the “Contents” folder, navigate to the “MacOS” folder. In this folder will be a UNIX executable file named “Applet”. Change the name of this file to whatever name you used as the value for “CFBundleExecutable” in the Info.plist file.
And there you go, you’ve got a hidden dock icon, and an app that you can easily find in Acitvity Monitor if you for some reason need to quit it.