Senin, 30 April 2018

How to Make Windows Speak the Time Out Loud Every Hour

It’s easy to lose track of time when you’re working at your computer. Using time-tracking apps can help you figure out where the hours went, but for some, hearing the time spoken out loud can help keep track of time.

While macOS has a time announcement feature built in, there’s nothing like this in Windows. Luckily, you can add it yourself in just a few moments.

How to Make Windows Speak the Time Out Loud

  1. Open Notepad or another text editor and paste the following:
    Dim speaks, speech
    hour_now=hour(time)
    if hour_now > 12 or hour_now = 12 Then
    hour12 = hour_now - 12
    ampm = "PM"
    Else
    hour12 = hour_now
    hourfinal = hour_now
    ampm = "AM"
    End If
    If hour12 = 10 Then
    hourfinal = "Ten"
    Elseif hour12 = 11 Then
    hourfinal = "Eleven"
    Elseif hour12 = 12 Then
    hourfinal = "Twelve"
    Elseif hour12 = 0 Then
    hourfinal = "Twelve"
    Elseif hour12 > 0 and hour12 < 10 Then
    hourfinal = hour12
    End If
    speaks = "It is " & hourfinal & " o clock " & ampm
    Set speech=CreateObject("sapi.spvoice")
    speech.Speak speaks
    
  2. Save this to a convenient location. Name the file whatever you want (perhaps TimeAnnounce), but make sure it ends in .vbs (a Visual Basic script).
  3. Type Task Scheduler into the Start Menu to open the Task Scheduler utility.
  4. Select Action > Create Task from the menu bar.
  5. Enter a Name for the task, like Announce Time.
  6. Switch to the Triggers tab and click the New button.
  7. Make sure One time is selected. Next to Start, select today’s date and choose the start of the next hour. For example, if it’s 10:37am, choose 11:00:00.
  8. Check the box for Repeat task every and choose 1 hour. Choose Indefinitely next to for a duration of and click the OK button.
  9. Switch to the Actions tab and click New. Click Browse next to the Program/script box and find the VBS file you made earlier.
  10. Click OK and you’ve created your task. You’ll hear the default text-to-speech voice announce the time at the top of every hour.

Windows Announce Time Trigger

No matter your method, you should consider some ways to make sure you meet your time management goals.

Tidak ada komentar:

Posting Komentar