Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background if Login Item launched



on 05/09/29 12:02, Bill Patterson at email@hidden wrote:

> How can I detect if the application is launched via the Login Items?

I'm not sure; check the command-line arguments argc and argv.

> How can I force the application to remain in the background after it
> is launched, even if it is the last or only Login Item?

Before you do too much work on this project, I advise you to clarify for
yourself, and then your readers here, exactly what you mean by "in the
background" by answering whether or not it should appear

- in the Dock?
- in the Force Quit menu?
- in the the cmd-tab Application Switcher (Panther, Tiger only)?

To make a long story short, there are ways of switching applications between
"foreground" and "background", but they don't always do everything you want
them to; the cleanest approach is to compile and package two separate
executables: one for "foreground", one for "background".


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden

References: 
 >Background if Login Item launched (From: Bill Patterson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.