Tuesday 3 December 2019

Speaking Clock in VBScript.


'One file follows
'SpeakingClock.vbs
'Speaks the time continuously
Set speech = CreateObject("sapi.spvoice")
Do
If Hour(Now) < 12 then
Var = Hour(Now) & " AM"
else
Var = Hour(Now) - 12 & " PM"
End If

speech.Speak Var & " and " & Minute(Now) & " minutes and " & Second(Now) & " seconds"
wscript.sleep 5
Loop

No comments:

Post a Comment