How to write an Applescript that will give me an hourly popup alert

I am wondering how to receive a pop-up alert on my computer (Mac OS X) every hour. I figured writing this in Applescript would be pretty simple, but I have no experience with Applescript. Thanks

+5
source share
2 answers

The main handler for regular use in AppleScript is the downtime handler.

on idle
 display dialog "Go back to work" buttons "Work Harder" default button "Work Harder"
 return 3600
end idle

This script will pop up a dialog box when the application starts, and then every 3600 seconds after clicking the button. Regardless of the number returned by the idle handler, the number of seconds until the next unoccupied event is triggered will be indicated.

, , , , idle script , , 60, , .

on idle
 if the minutes of the (current date) is 30 then
  display dialog "Go back to work" buttons "Work Harder" default button "Work Harder"
 end if
 return 60
end idle

. ( Unix, AppleScripts .)

AppleScript "" " ", , . " " "", .

+6

Jerry . AppleScript " " , AppleScript, , , - icone . : AppleScript :

on idle
  tell application "call_me"
    activate
  end tell
  display dialog "Back to work" buttons "Work!" default button "Work!"
  return 3600
end idle

script "Aplication" , "Do not quit" ( "Ne pas quitter aprés l'exécution" ), . "call_me" , , ( "xxxx" ) 3600 , .

: , , Applescript : " call_me.app?" .

!! !

0

All Articles