Timed Application opening and closing

Discussion in 'Mac Apps and Mac App Store' started by pknz, Apr 20, 2006.

  1. pknz macrumors 68020

    pknz

    Joined:
    Mar 22, 2005
    Location:
    NZ
    #1
    Is there any apps out there that allow you to set a time to open and close another app, ie Azureus?

    Is there a simple way to do this though Automator?

    Thanks
     
  2. Kernow macrumors 65816

    Kernow

    Joined:
    Sep 30, 2005
    Location:
    Kingston-Upon-Thames
    #2
    I think that you can do this through iCal. If you set up an event to occur at a particular time, you can choose for iCal to run a script instead of sound an alarm. All you would need then is an Applescript to tell Azureus to open. I haven't used Applescript before, but I'm sure someone should be able to knock one up for you.
     
  3. G99 macrumors 6502

    G99

    Joined:
    Mar 8, 2006
    #3
    If I'm understanding you correctly, you want a script to open the app at a certain time, and close it at another time?
    If so, this is what you need to do:
    First, copy this code into Script Editor, which is found in /applications/applescript.
    Code:
    tell application "Azureus"
    	activate
    end tell
    Save it somewhere, making sure you make the file format an "application".

    Then copy this code into Script Editor:
    Code:
    tell application "Azureus"
    	quit
    end tell
    Make sure you save this code as an "application" as well.

    Next, open up iCal, and create a new event. Name it whatever you like, but make sure you set the alarm as "open file". Find your first "activation" script, and set this as the file. Choose a suitable time for it to activate, and you're halfway through! If needed, you can set the file to run daily, or monthly etc by clicking the "repeat" menu, and selecting an option.

    Now, create another event, name it whatever you like, and set the alarm as "open file" find your second, "quitting" script, and set the alarm to open this file. Again, choose a suitable execution time, and choose a repeat option if you need to.

    Hope this helps! :)
     
  4. quigleybc macrumors 68030

    quigleybc

    Joined:
    Jun 17, 2005
    Location:
    Beautiful Vancouver British Columbia, Canada
  5. G99 macrumors 6502

    G99

    Joined:
    Mar 8, 2006
  6. pknz thread starter macrumors 68020

    pknz

    Joined:
    Mar 22, 2005
    Location:
    NZ
    #6
    Thanks for that G99.

    I think you can also do it by just setting an event every day in iCal to open a file, you select the application you want to run and set the time. Then in System Prefs, tell the computer to shutdown or restart at the end time.
     
  7. G99 macrumors 6502

    G99

    Joined:
    Mar 8, 2006
    #7
    Oh yeah...lol. Forgot about simply opening the app itself :eek:
     

Share This Page