How to make a chat bot! - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Programming
Click Here to Login
View Poll Results: How good do you think this tutorial is?
Excellent 5/5 2 33.33%
Very good 4/5 1 16.67%
Alright 3/5 2 33.33%
Not so good 2/5 0 0%
Rubbish 1/5 1 16.67%
Voters: 6. You may not vote on this poll

Closed Thread
 
Thread Tools Display Modes
 
Old 06-19-2007, 06:50 AM   #1 (permalink)
Ultra Techie
 
Join Date: Jul 2006
Posts: 889
Thumbs up 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
__________________

__________________
jay_bo is offline  
Old 06-19-2007, 07:03 AM   #2 (permalink)
Ultra Techie
 
Join Date: Jul 2006
Posts: 889
Default Re: How to make a chat bot!

Remember if you put any other characters such , ? ' then it wont work unles you type what yo have put in correctly. for example it you put....How are you? in the coding then u will have to put How are you? in when you run the program. it wont work if u miss the capital letter off or ?.
__________________

__________________
jay_bo is offline  
Old 06-19-2007, 08:01 AM   #3 (permalink)
Newb Techie
 
Join Date: Jun 2007
Posts: 19
Default Re: How to make a chat bot!

lol nice I would of built mine a bit better :P by doing the If statements, like you said it has to be precise or it wont work but good post
__________________
lutics is offline  
Old 06-19-2007, 08:10 AM   #4 (permalink)
Ultra Techie
 
Join Date: Jul 2006
Posts: 889
Default Re: How to make a chat bot!

i know but i wanted it so that anyway can make it like newbies and then develop it there selves. you could voted lol
__________________
jay_bo is offline  
Old 06-19-2007, 04:31 PM   #5 (permalink)
-Deactivated-
 
Oreo's Avatar
 
Join Date: Dec 2006
Location: England
Posts: 5,723
Send a message via MSN to Oreo
Default Re: How to make a chat bot!

Kool, except theres chat boys on msn.
__________________
-Deactivated-
Oreo is offline  
Old 06-19-2007, 04:46 PM   #6 (permalink)
Ultra Techie
 
Join Date: Jul 2006
Posts: 889
Default Re: How to make a chat bot!

what do you mean chat boys? and thanks
__________________
jay_bo is offline  
Old 06-26-2007, 05:48 AM   #7 (permalink)
Graphic Designer
 
mssssee2's Avatar
 
Join Date: Apr 2007
Location: Thessaloniki, Greece
Posts: 506
Send a message via MSN to mssssee2 Send a message via Yahoo to mssssee2
Default Re: How to make a chat bot!

I remeber I had done something simillar in Javascript, but for example statements were :

"Hallo"
"Hallo!"
"hallo"
"hallo!"
"HALLO"
"HALLO"

It was tiring so I decided the script to transcode it to capitals using the variable toUpperCase()

so the only I had to type was :

var prompt = window.prompt("Please type something")
var greet1 = "Hallo, user!"
var prompt2 = toUpperCase(prompt)
if (prompt2 == "HALLO") {
alert(greet1)
}
else if (prompt2 == "HALLO!") {
alert(greet1)
}

cause even if someone typed HaLLo! it would be taken as "HALLO!". Then you can add other statements to make it more User friendly.

I typed it fast, it might be buggy so do not test it.
__________________
Mike from Greece, 16

mssssee2 is offline  
Old 06-26-2007, 12:59 PM   #8 (permalink)
Monster Techie
 
Join Date: May 2004
Location: USA
Posts: 1,178
Default Re: How to make a chat bot!

Quote:
Originally Posted by jay_bo View Post
what do you mean chat boys? and thanks
Are you going to work on developing it some more? It'd be cool if you strayed away from all the if-else's, and used some context-matching logic (hah, I know, it'd be a lot of work!), but regular expressions along with a simple spell-checking library would make it a good step up.
__________________
Vormund is offline  
Old 06-27-2007, 06:31 AM   #9 (permalink)
Ultra Techie
 
Join Date: Jul 2006
Posts: 889
Default Re: How to make a chat bot!

I might do i dontknow yet i only made it to get use the program i might do just got to find time to but im thinking of making different stuff in vb6 but not sure yet any ideas are welcome and as sson as i have made i will post how to do it thanks for all the replies
__________________

__________________
jay_bo is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can I make this an active link? cliffhucker Programming 4 06-11-2007 11:32 PM
HP live chat tech support superdave1984 Off Topic Discussion 7 06-06-2007 03:30 PM
Make an AVI Smaller sir nerdalot Computer Audio and Multimedia 14 05-31-2007 08:27 AM
Nero 6 to make VCD sir nerdalot Computer Audio and Multimedia 0 05-21-2007 04:42 AM



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 04:24 PM.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.