I am wondering how to have a popup alert on my computer (Mac OS X) every hour. I figured writing this in Applescript would be pretty simple but I have no Applescript experience. Thanks
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The basic handler for doing things on a regular basis in AppleScript is the idle handler.
This script will pop up a dialog box when you start the application and then every 3,600 seconds after pressing the button. Whatever number the idle handler returns will be the number of seconds before the next idle event is triggered.
If you want it to be on the half-hour and not every sixty minutes, you’d want the idle script to return a different number of seconds, perhaps 60, and then check to see if you’re at the right part of the hour.
This will only display the dialog at half past. (Like Unix, AppleScript’s concept of the current date includes the current time.)
In each case, you want to save in AppleScript Editor as “Application” and “Stay Open” in order to have it respond to idle events instead of just quitting after running. And you can add the application to your list of “Login Items” in the “Accounts” system preference to make it run automatically when you log in.