If your AppleScript App is not "topped" at the time of the event, you may get an AppleScript error and the only think that will call you is the blinking of the icone in the doc. 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.Īfter testing Jerry solution, I found a problem. 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. (Like Unix, AppleScript’s concept of the current date includes the current time.) This will only display the dialog at half past. If the minutes of the (current date) is 30 then 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. Whatever number the idle handler returns will be the number of seconds before the next idle event is triggered. This script will pop up a dialog box when you start the application and then every 3,600 seconds after pressing the button. on idleĭisplay dialog "Go back to work" buttons "Work Harder" default button "Work Harder" The basic handler for doing things on a regular basis in AppleScript is the idle handler.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |