New
#10
GREAT little program, works like a charm. thank you Abhishek Ghosh!!!!
GREAT little program, works like a charm. thank you Abhishek Ghosh!!!!
I'm wondering how to make time a variable in this , for example its its 11am it will use the statement "Good Morning" or if its 2pm it will use "good afternoon" etc.
please help !
Ok, ok... I know, it isn't the most efficent way to made it.. but it work
Code:Dim speaks, speech, cTime Select Case Hour(now) case 4 cTime = "Good Morning" case 5 cTime = "Good Morning" case 6 cTime = "Good Morning" case 7 cTime = "Good Morning" case 8 cTime = "Good Morning" case 9 cTime = "Good Morning" case 10 cTime = "Good Morning" case 11 cTime = "Good Morning" case 12 cTime = "Good Morning" case 13 cTime = "Good Afternoon" case 14 cTime = "Good Afternoon" case 15 cTime = "Good Afternoon" case 16 cTime = "Good Afternoon" case 17 cTime = "Good Evening" case 18 cTime = "Good Evening" case 19 cTime = "Good Evening" case 20 cTime = "Good Evening" case 21 cTime = "Good Evening" case 22 cTime = "Good Evening" case 23 cTime = "Good Evening" case 0 cTime = "Good Night" case 1 cTime = "Good Night" case 2 cTime = "Good Night" case 3 cTime = "Good Night" End Select speaks=cTime & "Max" Set speech=CreateObject("sapi.spvoice") speech.Speak speaks
I added the code below to the script but it says:
---------------------------
Windows Script Host
---------------------------
Script: C:\Users\End-User\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Greetings.vbs
Line: 3
Char: 1
Error: Object required: '[undefined]'
Code: 800A01A8
Source: Microsoft VBScript runtime error
Code:
with speech Set .voice = .getvoices.item(0) .Volume = 100 .Rate = 0 end with
The line 3 character 1 is the word "with".