How to make a chat robot that actually works!
What u will need: Visual basic (You can download it for free from here Visual Studio Express: Downloads) and any other design software (optional) that you will need if you want to make it look like a chat window like msn.
1) open visual basic and create a windows application (Name it what you like)
2) Create a button and name it button1 it should be called tht automatically but you can change the text of the button to say SEND but u put that in under the button properties TEXT- Send NOT (NAME)-button1 leave tht!
4)Now double click on the button so you can enter code. Code as follows:
Public Class Form1
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If user.Text = "hello" Then
bot.AppendText("hello!! how are you?")
ElseIf user.Text = "hi" Then
bot.AppendText("hello my friend how are you?")
ElseIf user.Text = "hiya uk" Then
bot.AppendText("hiya yea thanks, how are you?")
ElseIf user.Text = "hey dude" Then
bot.AppendText("hey dude how are you?")
ElseIf user.Text = "im fine thanks, how are you?" Then
bot.Text = "Good Good, i'm fine thanks for asking, i went out last nyt with Homer, ive got a banging headache"
ElseIf user.Text = "good" Then
ElseIf user.Text = "im good thanks, uk?" Then
bot.Text = "Good Good, i'm fine thanks for asking, i went out last nyt with Homer, ive got a banging headache"
ElseIf user.Text = "good" Then
bot.Text = "So then what have you been up to lately?"
ElseIf user.Text = "nothin much" Then
bot.Text = "I'm sure you have been up to something "
ElseIf user.Text = "I haven't" Then
bot.Text = "Well your best off speaking to me then "
End If
End Sub
IF you want to add more in put it in front of (END IF)
ElseIf user.text = " WHAT EVER YOU WANT TO PUT" Then
bot.text = "WHAT EVER YOU WANT TO PUT"
5)Create two textbox and Name the 1st textbox you drawn -bot (this is where the bot talks back) and name the second one - user (this is where you will talk to the bot) they are case sensitive
6)Thats it unless you want to add any pictures or menus in like me? ask if you want more info on that.
DON'T FORGET TO BUILD YOUR PROJECT
HAVE FUN i called my bot bender and got a picture of hime and homer simpson drinking together and i add created a pm saying great night last night homer
What u will need: Visual basic (You can download it for free from here Visual Studio Express: Downloads) and any other design software (optional) that you will need if you want to make it look like a chat window like msn.
1) open visual basic and create a windows application (Name it what you like)
2) Create a button and name it button1 it should be called tht automatically but you can change the text of the button to say SEND but u put that in under the button properties TEXT- Send NOT (NAME)-button1 leave tht!
4)Now double click on the button so you can enter code. Code as follows:
Public Class Form1
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If user.Text = "hello" Then
bot.AppendText("hello!! how are you?")
ElseIf user.Text = "hi" Then
bot.AppendText("hello my friend how are you?")
ElseIf user.Text = "hiya uk" Then
bot.AppendText("hiya yea thanks, how are you?")
ElseIf user.Text = "hey dude" Then
bot.AppendText("hey dude how are you?")
ElseIf user.Text = "im fine thanks, how are you?" Then
bot.Text = "Good Good, i'm fine thanks for asking, i went out last nyt with Homer, ive got a banging headache"
ElseIf user.Text = "good" Then
ElseIf user.Text = "im good thanks, uk?" Then
bot.Text = "Good Good, i'm fine thanks for asking, i went out last nyt with Homer, ive got a banging headache"
ElseIf user.Text = "good" Then
bot.Text = "So then what have you been up to lately?"
ElseIf user.Text = "nothin much" Then
bot.Text = "I'm sure you have been up to something "
ElseIf user.Text = "I haven't" Then
bot.Text = "Well your best off speaking to me then "
End If
End Sub
IF you want to add more in put it in front of (END IF)
ElseIf user.text = " WHAT EVER YOU WANT TO PUT" Then
bot.text = "WHAT EVER YOU WANT TO PUT"
5)Create two textbox and Name the 1st textbox you drawn -bot (this is where the bot talks back) and name the second one - user (this is where you will talk to the bot) they are case sensitive
6)Thats it unless you want to add any pictures or menus in like me? ask if you want more info on that.
DON'T FORGET TO BUILD YOUR PROJECT
HAVE FUN i called my bot bender and got a picture of hime and homer simpson drinking together and i add created a pm saying great night last night homer