Re: Starting as Startup Item?
Re: Starting as Startup Item?
- Subject: Re: Starting as Startup Item?
- From: Mihkel Tammepuuu <email@hidden>
- Date: Sat, 4 Dec 2004 21:16:50 +0200
At 18:15 +0000 04.12.2004, Finlay Dobbie wrote:
On Sat, 4 Dec 2004 09:28:23 +0100, M. Uli Kusterer
<email@hidden> wrote:
At 10:20 Uhr +0200 04.12.2004, Mihkel Tammepuuu wrote:
>How can an application determine if it was launched as a Startup
>Item on logging in to Mac OS or a usual way like (double)clicking
>it's icon?
IIRC you get some additional parameters to your main() function when
you're launched from Finder.
I don't think that this is documented behaviour, and anyway I think
that this happens regardless of who launches your application (as long
as it was done via Launch Services).
Looking at main() arguments don't help much, I always get 2
arguments, the first is of course the app executable path and the
second is a rather obscure string beginning with minus sign like
-psn_0_1441793 or -psn_0_1966081.
You can see these arguments if you issue ps -axl command and make the
Terminal wide enough. Also looking at ppid DOES NOT help, parent
process is
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Resources/WindowServer
either way.
//
Mihkel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden