Open a file when application launch

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

  1. macrumors member

    Joined:
    Oct 16, 2008
    Messages:
    41
    #1
    Hi,

    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

    kainjow

    Joined:
    Jun 15, 2000
    Messages:
    7,743
    #2
    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 68020

    Krevnik

    Joined:
    Sep 8, 2003
    Messages:
    2,375
    #3
    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