Argh, I’ve just spent an hour checking out about a dozen alarm clock/reminder apps on VersionTracker, as I am wanting my Mac to chime on the hour rather than speak the time.
Surely this is easy to do with a little AppleScript? Or is it an automator thing?
A week ago one has published a widget on www.dashboardwidgets.com which lets you define an interval and then plays a sound repeatly.
I just can’t remember the name of it!
Yeah, widgets are great and all, but this wouldn’t be a very good AppleScript forum if nobody even tried to write a script. Here is my attempt. Saved as a stay-open app.
on idle
say "ding dong" using "Bells"
set idle_time to (hours * (hours of ((current date) + hours))) - (time of (current date))
if idle_time < 0 then set idle_time to days - (time of (current date))
return idle_time
end idle
I just wrote that out of thin air, so I haven’t had enough time (har-har) to test it much. I’m running my system on a 24 hour clock but I don’t think that should make any difference. If you download this free faceless background application (http://microcosmsoftware.com/playsound/) you can do more “fun” things like chime off the number of hours since noon/midnight:
on idle
set hour_count to hours of (current date)
if hour_count > 12 then set hour_count to hour_count - 12
tell application "Play Sound" to play (path to library folder from system domain as string) & "Sounds:Blow.aiff" repeat (hour_count - 1)
set idle_time to (hours * (hours of ((current date) + hours))) - (time of (current date))
if idle_time < 0 then set idle_time to days - (time of (current date))
return idle_time
end idle
If nothing else, rolling one’s own simple applet can be a bit of fun. The suggestion below merely uses a plain beep - but it could, with the aid of a scripting addition or app, be easily modified to enhance the chime and become a faceless app. (In terms of playing sound, I see that silvermeteors has already suggested Play Sound - a small, speedy and most effective application written by David Blache.)
Anyway, FWIW:
property chimeCount : 0
on idle
repeat chimeCount times
say "oo" using "Bells"
end repeat
tell (current date)'s time
set chimeCount to it div hours mod 12 + 1
hours - it mod hours
end tell
end idle
set chimeCount to 0
Edit 1: calculation for the idle handler return value modified as suggested (below) by Qwerty. Edit 2: beep replaced by voice-synthesised “chime” - courtesy jobu (also below)
That’s a neat idea, jobu. It effectively differentiates the “chimes” from the current alert sound - and still retains the vanilla flavour of the script. Duly incorporated - thanks.
(BTW, for a lower, slower chime, I also tried: say “[[slnc 1000]]oooooo” using “Bells” :rolleyes:)