Last active
December 26, 2021 15:18
-
-
Save mdsaif45/bd1b658dca94c7cf9a409d2984b9c138 to your computer and use it in GitHub Desktop.
Create new task set for every hour.. your system speaks time for you (works in all versions of window operating system)
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
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment