Created
May 17, 2022 08:58
-
-
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.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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