• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pass paramters to application started from login items (in user prefs)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pass paramters to application started from login items (in user prefs)


  • Subject: Re: Pass paramters to application started from login items (in user prefs)
  • From: Mike Abdullah <email@hidden>
  • Date: Thu, 9 Nov 2006 18:56:41 +0000

There's an option in the System Preferences to have a login item launch and be "hidden" - what is wrong with letting your users choose like this?

Mike.

On 9 Nov 2006, at 17:40, Johannes Hoffart wrote:

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:
40gmail.com


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Pass paramters to application started from login items (in user prefs) (From: Johannes Hoffart <email@hidden>)

  • Prev by Date: Custom app class and NSApplicationLoad
  • Next by Date: Re: Custom app class and NSApplicationLoad
  • Previous by thread: Pass paramters to application started from login items (in user prefs)
  • Next by thread: Re: Pass paramters to application started from login items (in user prefs)
  • Index(es):
    • Date
    • Thread