Pass paramters to application started from login items (in user prefs)
Pass paramters to application started from login items (in user prefs)
- Subject: Pass paramters to application started from login items (in user prefs)
- From: Johannes Hoffart <email@hidden>
- Date: Thu, 9 Nov 2006 18:40:44 +0100
Hi!
I have got a problem concerning starting my cocoa app using the login
items (in the user preferences). I want the application to behave
differently when started on login than when the user starts it by
double-clicking in the finder or the dock - the main window should
remain hidden.
Currently I'm passing command line parameters to the application and
read them using the NSUSerDefaults system, which works perfectly. The
problem is that I cannot pass command line parameters in the login
items.
Is there any way to detect if an application is launched at user
login? Or a way to pass parameters? I do not really want to write a
helper app only to start my real application with the main window
hidden (actually I have already written a C executable using fork and
execve, which works perfectly, but adding it to login items brings up
my text editor of choice displaying the contents of the file instead
of executing it ;) )
thanks in advance
Johannes
_______________________________________________
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