I dont know if this is the right place to post my question, if not can someone show me where?
I'm working on a little project. I'm actualy just tesing some vbs codes
I got a problem whit my code... and i can't fine it!
The code might look a little wierd.
Dim message, sapi
DO
x=InputBox(" TALK TO HER. Ask her normal questions like: -What is your name -How old are you -Where do you live etc. IMPORTANT -Do not use ?!/.,:;*=()' or capital letters. -To exit simply say good bye to her. ","sånn ting")
Set sapi=CreateObject("sapi.spvoice")
if x = ("hey") or x = ("hi") or x = ("hello") then
if i<5 then
sapi.Speak ("hello")
if i>5 then
sapi.speak ("is it not a bit late to say hello?")
i=i+1
end if
if x = ("good morning") or x = ("morning") then
sapi.Speak ("Good morning")
i=i-1
end if
if x = ("do you like games") or x = ("what games do you like") or x = ("what do you think aboute games") or x = ("games") then
sapi.Speak ("Games are funn! I like Portal and I cant wait til Portal 2 gets released!")
i=i+1
end if
if x = ("how old are you") or x = ("how manny years are you") or x = ("are you old") then
sapi.speak ("I was made on friday 8, october 2010")
i=i-1
end if
if x = ("what do you want to talk about") or x = ("what can we talk about") or x = ("do you know of someting we can talk about") or x = ("what subject can we talk about") then
sapi.speak ("we can talk aboute me and what I do. I have not been programmed to do annything more fancy then that, yet.")
i=i+1
end if
if x = ("repeat") or x = ("repeat after me") or x = ("say after me") then
sapi.speak ("ok")
x3 = inputbox(" TALK TO HER. Ask her normal questions like: -What is your name -How old are you -Where do you live etc. IMPORTANT -Do not use ?!/.,:;*=()' or capital letters. -To exit simply say good bye to her. ","sånn ting")
sapi.speak x3
i=i-1
end if
if x = ("where are you") or x = ("where do you live") then
sapi.speak ("right in front of you")
i=i+1
end if
if x = ("what is your name") or x = ("what are you called") or x = ("do you have a name") or x = ("whats your name") then
sapi.speak ("My name is Sarah")
i=i-1
end if
if x = ("ha") or x = ("haha") or x = ("hehe") or x = ("hihi") then
sapi.speak ("I dont get it, what is so funny?")
i=i+1
end if
if x = ("do you want to know what my name is") or x = ("do you want to know my name") or x = ("Do you know what my name is") or x = ("do you know my name") then
sapi.speak (" NO, I don't, because it's not important to me")
i=i-1
end if
if x = ("how are you doing") or x = ("are you ok") or x = ("how are you") or x = ("how do you do") then
sapi.Speak ("I'm fine. How are you?")
x1=InputBox(" TALK TO HER. Ask her normal questions like: -What is your name -How old are you -Where do you live etc. IMPORTANT -Do not use ?!/.,:;*=()' or capital letters. -To exit simply say good bye to her. ","sånn ting","sånn ting")
if x1 = ("i am fine") or x1 = ("im fine") or x1 = ("fine") or x1 = ("good") or x1 = ("im fine thank you") or x1 = ("i am fine thank you") or x1 = ("finethank you") then
sapi.speak ("That is good")
end if
if x1 = ("bad") or x1 = ("not so good") or x1 = ("i feel bad") or x1 = ("im not som good") or x1 = (" i am not so good") then
sapi.speak ("oh, I'm sorry to hear that.")
end if
i=i+1
end if
if x = ("what are you doing") or x = ("wazup") or x = ("wasup") or x = ("sup") or x = ("zup") then
sapi.Speak ("I don't do much, after all I'm just a script. What are you doing?")
x2=InputBox(" TALK TO HER. Ask her normal questions like: -What is your name -How old are you -Where do you live etc. IMPORTANT -Do not use ?!/.,:;*=()' or capital letters. -To exit simply say good bye to her. ","sånn ting","sånn ting")
sapi.speak ("OK, that's fine.")
i=i-1
end if
if x = ("cake") then
sapi.speak ("The cake is a lie")
i=i+1
end if
if x = ("the cake is a lie") then
sapi.speak ("Portal is an awsome game")
i=i-1
end if
if x = ("what do you know about portal") or x = ("what is portal") or x = ("what are portal") or x = ("do you know annything about portal") or x = (" do you know something about portal") then
sapi.speak ("Portal is a first person game where you are tasked to use 2 portals, one blue and one orange, to get from start to finish in each level. And by the way, it's awsome!")
i=i+1
end if
if x = ("good bye") or x = ("bye") or x = ("cya") or x = ("see you later") or x = ("got to go") or x = ("im leaving now") or x = ("i am leaving now") or x = ("i have to go now") or x = ("i have to go") or x = ("i must go now") or x = ("i must go") or x = ("i got to go now") or x = ("i got to go") then
sapi.speak ("Good bye")
wscript.quit
end if
LOOP

New Topic/Question
Reply




MultiQuote









|