Re: How to tell if app launched via login item (versus manual launch)
Re: How to tell if app launched via login item (versus manual launch)
- Subject: Re: How to tell if app launched via login item (versus manual launch)
- From: "Sean McBride" <email@hidden>
- Date: Mon, 12 Jan 2009 21:36:28 -0500
Ken Thomases (email@hidden) on 2008-11-26 2:33 AM said:
>> I'm wondering if it's possible to tell if my application was launched
>> normally by the user, or if it was launched by virtue of being in the
>> login items.
>
>You need to look up the Apple Event that is current at the time of
>your application's launch. Use [[NSAppleEventManager
>sharedAppleEventManager] currentAppleEvent].
Ken's solution is best, but if you need 10.3 support or want to check
after the open AppleEvent has passed, you can also call
GetProcessInformation() and look at the 'processLauncher' field of the
returned struct.
(Sorry for the really late reply. ;))
Sean
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden