View Single Post
Old 10-28-2016, 04:50 AM
b_rianv b_rianv is offline
Join Date: Sep 2014
Posts: 13
Default Would like to have

This works great Sir! Thank you so much but I would also like this code to also speak current (day of week and date) along with the time. I can't find any code to incorporate in to this script and where I would add it to the script so that it will do this.
Example of what the code would say...
Brian, Good morning!
Brian, the time is, 7:30 a.m. Friday October 28 2016
So on and so forth

Van you or someone help me please??

Here is the working code you helped me with.

Dim sapi,hr,ampm,wish
Set sapi = CreateObject("sapi.spvoice")
end if
end if
if(hour(now)<12)Then ampm="AM" end if 

if(hour(now)>12)Then ampm="PM" end if

if(hour(now)>=0) and (hour(now)<12)Then wish="Brian,Good Morning" end if 
if(hour(now)>=12) and (hour(now)<=17)Then wish="Brian,Good Afternoon" end if
if(hour(now)>=17) and (hour(now)<=23)Then wish="Brian,Good Evening" end if 

sapi.Speak wish+". Brian, the time is "+cstr(Time)
Thank you,
Reply With Quote