How to make your windows to speak ?

First of all -


Create new notepad file.

Copy below code and paste on notepad file.
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")

dim str

if hour(time) < 12 then
Sapi.speak " good morning Shivam"
else
if hour(time) > 12 then
if hour(time) > 16 then
Sapi.speak "Good evening Shivam"
else
Sapi.speak "Good afternoon User"
end if
end if
end if

Sapi.speak "The current time is "

if hour(time) > 12 then
Sapi.speak hour(time)-12
else
if hour(time) = 0 then
Sapi.speak "12"
else
Sapi.speak hour(time)
end if
end if


if minute(time) < 10 then
Sapi.speak "o"
if minute(time) < 1 then
Sapi.speak "clock"
else
Sapi.speak minute(time)
end if
else
Sapi.speak minute(time)
end if

if hour(time) > 12 then
Sapi.speak "P.M."
else
if hour(time) = 0 then
if minute(time) = 0 then
Sapi.speak "Midnight"
else
Sapi.speak "A.M."
end if
else
if hour(time) = 12 then
if minute(time) = 0 then
Sapi.speak "Noon"
else
Sapi.speak "P.M."
end if
else
Sapi.speak "A.M."
end if
end if
end if


Now save this file with .vbs 

Run the same.







Enjoy. Follow us for more... 

No comments:

Post a Comment

What is Prototype content functions in JavaScript Framework Programming.mp4

  Download now Enjoy! Follow us for more...