script to run an app when wake from sleep mode

Discussion in 'Mac Programming' started by makisf4, Sep 22, 2009.

  1. makisf4 macrumors newbie

    Sep 22, 2009
    Hello there...
    I am trying to find a way to auto-run an application right after my imac wakes from sleep mode. ( i am in 10.5.8)
    {I know I can do that when the computer starts up from shutdown (in the login items of my account in user preferences)}.
    Can I use an apple script that "understands" that the computer has just recovered from sleep mode and run the app that I want? (the application is actually something I created with automator)
    What the script would be like... is there a command that knows when the computer wakes from sleep?
  2. ramases macrumors member

    Jan 14, 2008
    I don't know if this is of any help. Try looking at Sleepwatcher
    There is some source code available that may guide you in the right direction
  3. makisf4 thread starter macrumors newbie

    Sep 22, 2009
    Oh yes!
    Sleepwatcher did the trick.
    Thank you very much!

Share This Page