Open a file when application launch

Discussion in 'Mac Programming' started by rethish, Jun 15, 2009.

  1. macrumors member

    Oct 16, 2008

    I need to open the saved project file which is stored in the document folder by using scheduling.

    I created a plist file to launch my application at the scheduled time and and its working well. But I need to load the saved project file, when the application launches.

    How can I do it?
    What are the procedures to do it?

    Thank you in advance.
  2. Moderator emeritus


    Jun 15, 2000
    Is this your application, or someone else's? If the latter, I'm not aware of any built-in ways of doing this. I think you'd have to write a helper process to track when apps get launched.
  3. macrumors 68030


    Sep 8, 2003
    For the scheduled task, you could always use the 'open' command instead of calling the application directly.

    '/usr/bin/open' with arguments '-a <app name> <document path>' will do the trick I'd think.

Share This Page