Mac OS 9 Lives
Mac OS 9 Discussion => Mac OS 9, Hacks & Upgrades => Topic started by: torvan on October 12, 2024, 02:09:17 PM
-
Hello,
I would really like to find a way for OS9 to announce time. Not just play a chime, but actually say "it is eleven nineteen" when it is 11:19.
Sure, I can use little applications like BluClock to alarm me, but I would rather have one of the voices tell me.
Any ideas?
-
I am starting to get a tingle in my brain, saying that it might be time to figure out apple script. I will see what I can do... No big promises but that may be a solution I can come back with.
-
So I got this very simple apple script wrapped up to shout out the time when activated;
set currentTime to time string of (current date)
say "The time is" & currentTime
I am just not sure how you are getting the chime so I am not sure on how to activate it automatically.
-
Here is a much better Apple Script. I think this a good way to get started with you read out loud clock alarm. I am just not sure how to trigger it, for your use case.
-- Get the current time as a string
set currentTime to time string of (current date)
-- Parse the time string (e.g., "11:19:34 AM") using space as delimiter to split time and period
set AppleScript's text item delimiters to " "
set timeParts to every text item of currentTime
-- First part is the time (e.g., "11:19:34")
set timePart to item 1 of timeParts
-- Second part is the period (AM or PM)
set timePeriod to item 2 of timeParts
-- Now split the timePart by colon to get hours and minutes (ignore seconds)
set AppleScript's text item delimiters to ":"
set hourPart to text item 1 of timePart
set minutePart to text item 2 of timePart
-- Construct the time string to speak
set timeString to "The time is " & hourPart & ":" & minutePart & " " & timePeriod
-- Speak the time
say timeString
-
Thanks Doug2000, that script does announce the time when opened, so I am halfway there. Now to figure out how to run it at a specific time.
I am such a newbie at AppleScript. . . . . .