Posted By

TALlama on 05/14/09


Tagged

pause sleep twitter wait silence


Versions (?)

Application Sleeper


 / Published in: AppleScript
 

When I'm watching a movie on my computer, I get tired of Twitterrific popping up and obscuring my view. And I got really tired of quitting the app and forgetting to open it up again. So I wrote this little script that quits the app for me and opens it automatically some time later.

This isn't perfect; the script will be running the whole time in between quit and relaunch, but without getting into launchd or atrun, this works just fine.

  1. set appName to "Twitterrific"
  2.  
  3. display dialog "How many minutes should I sleep?" default answer "60"
  4. set waitFor to (text returned of result as number) * 60
  5.  
  6. tell application appName to quit
  7. delay waitFor
  8. tell application appName to activate

Report this snippet  

You need to login to post a comment.