How do I get an app to launch at start up without it popping up on the screen.

jasfa131

The Lone Deranger
How do I get iCal and Internet Connect to launch at start up, but without actually appearing on my screen. (I want them running in the background)
Thanks
 
Make sure the "Hide" box is checked for the apps in your "Login Items" list... that should do it.

From the Mac Help files:
1. Choose Apple menu > System Preferences and click Accounts.
2. Click Login Items and then click Add (+).
3. Select an application or document and click Add.
4. Drag items in the list to change the order in which they open.
5. Click the Hide checkbox next to an application if you don't want a window for the application to open.
 
Make sure the "Hide" box is checked for the apps in your "Login Items" list... that should do it.

This seems to work for all except Mail! For some reason, I cannot convince Mail.app to launch at login without the windows being displayed!
 
Mail is one of the rare examples where the hiding does not work with that login and hide combination in 10.4.x, Ken.
 
Instead of launching Mail on login, why not launch an AppleScript application instead which does the job for you. For example:

Code:
tell application "Finder"
	launch application "Mail"
end tell

delay 1

tell application "Mail"
	close window 1
end tell
Save that as an applicaton, add it to your Login Items, and you should be all set.
 
So there's a problem (of course) with my previous suggestion: What if the application takes longer than a second or so to open? So here's an updated version of the script which waits until the applications is in fact running:

Code:
tell application "Finder" to launch application "Mail"

tell application "System Events"
   set ProceedOK to false
	
   repeat while ProceedOK is false
      set ProceedOK to (name of processes) contains "Mail"
      delay 1
   end repeat
end tell

tell application "Mail" to close window 1
 
So there's a problem (of course) with my previous suggestion: What if the application takes longer than a second or so to open? So here's an updated version of the script which waits until the applications is in fact running:

Code:
tell application "Finder" to launch application "Mail"

tell application "System Events"
   set ProceedOK to false
	
   repeat while ProceedOK is false
      set ProceedOK to (name of processes) contains "Mail"
      delay 1
   end repeat
end tell

tell application "Mail" to close window 1

Does that not cause the window to be closed, rather than simply hiding it? What is desired is for apps told to start at login to start in the state with their windows hidden rather than visible. Most apps will do this, but Mail seems to ignore the request.
 
Does that not cause the window to be closed, rather than simply hiding it? What is desired is for apps told to start at login to start in the state with their windows hidden rather than visible. Most apps will do this, but Mail seems to ignore the request.
Yes, this is nothing more than a work-around for Mail. If you want to specifically Hide the app (so that you can select "Show" from the Dock pop-up menu for example) instead of closing the window you could change the last line of the script to something like:

Code:
tell application "System Events" to set visible of process "Mail" to false
 
Back
Top