AppleScript: Run process after "X" seconds of inactivity

Discussion in 'Mac Programming' started by rock6079, May 16, 2009.

  1. rock6079 macrumors 6502

    Jan 6, 2004
    I'm working on an AppleScript/Automator process that will essentially act like a screensaver. I will include it as a login item and want it to execute after X seconds/minutes of inactivity (i.e. no keyboard or mouse movement)

    1. If there is no input/activity from user then
    2. Launch /Library/

    Step 2 is quite easy but I cannot figure out how to get past step one, lol. any ideas/help? :confused:

    Thanks! :)
  2. dmmcintyre3 macrumors 68020

    Mar 4, 2007
    I can do this with a shell script.

    Command 1 &
    sleep x (x = amount of time in seconds)
    Command 2
    use osascript from a shell script to run applescript

Share This Page