Skip to content

Instantly share code, notes, and snippets.

@extratone
Created May 17, 2022 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save extratone/038e2a5d448a35566720cff64bbcac03 to your computer and use it in GitHub Desktop.
Save extratone/038e2a5d448a35566720cff64bbcac03 to your computer and use it in GitHub Desktop.
Play a system notification sound for the numeric value of the current hour in quick succession. (Think grandfather clock.)
on getTimeInHours()
-- Get the "hour"
set timeStr to time string of (current date)
set Pos to offset of ":" in timeStr
set theHour to characters 1 thru (Pos - 1) of timeStr as string
set timeStr to characters (Pos + 1) through end of timeStr as string
return (theHour) as string
end getTimeInHours
set CurrentTime to getTimeInHours()
beep CurrentTime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment