How can I make Mac apps self-minimize?
February 22, 2010 4:23 PM   Subscribe

How can I automatically minimize a running application to the dock?

Here's what's happening:

I'm running Snow Leopard (10.6.2) on an iMac, and use Doorstop X as my firewall.

Doorstop doesn't have any preferences for starting on boot, so I added the application to my login items. When I restart, Doorstop runs, but the application window runs as well. I then have to manually minimise it to get it out of the way (hit yellow dot or double-click the title bar).

I tried ticking the "hide" checkbox next to Doorstop in the login items, but that had no effect.

I'm not familiar at all with Automator or Applescripts, but is there a way to use one of those to tell Doorstop to self-minimise to the dock after it starts?
posted by bwg to Computers & Internet (4 answers total)
 
Best answer: You can save an Applescript as an app, then put that in your start up. That should work.

Another option would be to use spaces. Create a new space, have the app open there. Not minimized, but you'll never see it, so who cares?

The applescript would be something like:

tell application "Doorstop"
activate
end tell
tell application "Doorstop"
set miniaturized of window 1 to true
end tell


I didn't test this, as I don't have Doorstop.

You for sure could also create a shell script to do this, but I am even more out of my element there.
posted by cjorgensen at 4:42 PM on February 22, 2010


This doesn't automate it, but hitting Command-H might be a quicker way to hide the application.
posted by nitsuj at 5:13 PM on February 22, 2010


Not an exact solution, but I can't recommend Spirited Away enough. It automatically hides windows after a period of inactivity (and allows exclusions). It reduces visual clutter, and will automatically hide all the crap that might pop up on startup (after the timeout, of course).
posted by CharlesV42 at 5:50 PM on February 22, 2010 [1 favorite]


Response by poster: Thanks all.

cjorgensen, your script was perfect, after reboot, the app loaded, the applescript loaded and in a few seconds Doorstop X dropped down to the dock.

One less bit of clutter to deal with!
posted by bwg at 9:29 PM on February 22, 2010


« Older Suggestions for space saving furniture please.   |   Long term consequences of babies watching TV? Newer »
This thread is closed to new comments.