• 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
Pass paramters to application started from login items (in user prefs)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Pass paramters to application started from login items (in user prefs)
      • From: "Sean McBride" <email@hidden>
    • Re: Pass paramters to application started from login items (in user prefs)
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: Accessing structure member NSDate in NSTableView
  • Next by Date: Re: Filename of audio CDs modified by Finder
  • Previous by thread: Re: Filename of audio CDs modified by Finder
  • Next by thread: Re: Pass paramters to application started from login items (in user prefs)
  • Index(es):
    • Date
    • Thread