Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Annouce time  (Read 449 times)

torvan

  • 128 MB
  • ****
  • Posts: 145
  • Old School
Annouce time
« 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?
Logged
15 Macs (13 of them ranging from an SE to a MDD), 2 iPads, 2 iPhones, 1 Hackintosh. Small house getting smaller with each Mac. . . . .  .Husband shakes his head but supports my habit.

Doug2000

  • 8 MB
  • **
  • Posts: 9
Re: Annouce time
« Reply #1 on: October 12, 2024, 03:00:09 PM »

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.
Logged

Doug2000

  • 8 MB
  • **
  • Posts: 9
Re: Annouce time
« Reply #2 on: October 12, 2024, 03:08:30 PM »

So I got this very simple apple script wrapped up to shout out the time when activated;

Code: [Select]
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.
Logged

Doug2000

  • 8 MB
  • **
  • Posts: 9
The Voice reads the time! APPLE SCRIPT!
« Reply #3 on: October 12, 2024, 03:35:06 PM »

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.

Code: [Select]
-- 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
Logged

torvan

  • 128 MB
  • ****
  • Posts: 145
  • Old School
Re: Annouce time
« Reply #4 on: October 14, 2024, 05:40:10 PM »

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. . . . . .
Logged
15 Macs (13 of them ranging from an SE to a MDD), 2 iPads, 2 iPhones, 1 Hackintosh. Small house getting smaller with each Mac. . . . .  .Husband shakes his head but supports my habit.
Pages: [1]   Go Up

Recent Topics