I like vb6 and have being working on building a robot, I want to add voice reconition and speach.
I found some code for a chatterbot and want to add to it some more.
but....
If i add 10000 lines of ElseIf 's
in my module code.
It crashes saying "Procedure to large".
Does anyone know how i could add these ElseIf's into a text file to look for the key words?
Thanks
ElseIf InStr(strQuestion, "good-night") Then strAnswer = "good night, hope to talk to you later." AnsFound = True ElseIf InStr(strQuestion, "why") Then strAnswer = "why what?" AnsFound = True LogQuestion ElseIf InStr(strQuestion, "what!") Then strAnswer = "I didn't stu-stu-stutter!" AnsFound = True LogQuestion ElseIf InStr(strQuestion, "what") Then strAnswer = "This is the best I can think of for that." AnsFound = True LogQuestion Else strAnswer = "I'm afraid I don't understand what you have" LogQuestion End If End If AnsFound = True ElseIf InStr(strQuestion, "are you") Then strAnswer = "I don't know right now" AnsFound = True ElseIf InStr(strQuestion, "i am") Or InStr(strQuestion, "i'm") Then strAnswer = "I'm sorry, I'm not sure what you are" AnsFound = True LogQuestion ElseIf InStr(strQuestion, "shit") Then strAnswer = "you do have a foul mouth" AnsFound = True ElseIf strQuestion = "hi" Then strAnswer = "Hi, welcome to the session." AnsFound = True ElseIf InStr(strQuestion, "howdy") Then strAnswer = "Hi, welcome to the session." AnsFound = True ElseIf InStr(strQuestion, "hey") Then strAnswer = "what? what's up?" AnsFound = True