7h331337 Posted August 6, 2008 Share Posted August 6, 2008 (edited) hi ok this bot talks to peeps on windows messenger and learns like if someone said hi it will reply with a random answer and it will learn form the person that it is talking to enjoy CODE #include <GUIConstantsex.au3> Global $file1 $linecount = 0 $Form1 = GUICreate("Form1", 327, 238, 211, 124) GUISetCursor(14) GUISetBkColor(0xFFFFFF) $Edit1 = GUICtrlCreateEdit("", 8, 16, 153, 185) $Input1 = GUICtrlCreateInput("", 8, 208, 297, 23) $name = GUICtrlCreateInput("type name", 176, 16, 129, 25) $time = GUICtrlCreateInput(5000, 176, 48, 129, 25) $Button1 = GUICtrlCreateButton("pause", 176, 80, 129, 33, 0) $Button2 = GUICtrlCreateButton("start", 176, 120, 129, 33, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() if $nMsg = $GUI_EVENT_CLOSE then FileDelete("tech.txt") Exit EndIf if $nMsg = $Button1 Then pause() EndIf if $nMsg = $Button2 Then start() EndIf Sleep(200) WEnd Func start() While 1 $nMsg = GUIGetMsg() if $nMsg = $GUI_EVENT_CLOSE then FileDelete("tech.txt") Exit EndIf if $nMsg = $Button1 Then pause() EndIf if $nMsg = $Button2 Then start() EndIf $ranfile = Random(1, 3, 1) Select Case $ranfile = 1 $file = @ScriptDir & "\mybrain.ini" Case $ranfile = 2 $file = @ScriptDir & "\mybrain1.ini" Case $ranfile = 3 $file = @ScriptDir & "\mybrain2.ini" EndSelect $ran = Random(1, 21, 1) Select Case $ran = 1 $var = "ok " Case $ran = 2 $var = "klkl " Case $ran = 3 If FileGetSize("tech.txt") > 0 Then $line = Random(1, $linecount, 1) $var = FileReadLine("tech.txt", $line) Else $var = " i like that" EndIf Case $ran = 4 $var = "dont make me angery " Case $ran = 5 $var = "your cool " Case $ran = 6 $var = "i love me " Case $ran = 7 $var = "my name is j " Case $ran = 8 $var = "i like hevy metal " Case $ran = 9 $var = "ok " Case $ran = 10 If FileGetSize("tech.txt") > 0 Then $line = Random(1, $linecount, 1) $var = FileReadLine("tech.txt", $line) Else $var = "no " EndIf Case $ran = 11 $var = "realy " Case $ran = 12 $var = "um... yep " Case $ran = 13 $var = "lol no " Case $ran = 14 $var = "lol ok " Case $ran = 15 If FileGetSize("tech.txt") > 0 Then $line = Random(1, $linecount, 1) $var = FileReadLine("tech.txt", $line) Else $var = "yes " EndIf Case $ran = 16 $var = "lol yes " Case $ran = 17 $var = "how are u " Case $ran = 18 If FileGetSize("tech.txt") > 0 Then $line = Random(1, $linecount, 1) $var = FileReadLine("tech.txt", $line) Else $var = "i need booz " EndIf Case $ran = 19 $var = "i want a ciggare " Case $ran = 20 If FileGetSize("tech.txt") > 0 Then $line = Random(1, $linecount, 1) $var = FileReadLine("tech.txt", $line) Else $var = "i need to learn somthing" EndIf Case $ran = 21 $var = "your awsome " EndSelect Sleep(GUICtrlRead($time)) $msnread = ControlGetText(GUICtrlRead($name), "", "RichEdit20W1") If $msnread > "" Then $str = StringSplit($msnread, @CRLF) ToolTip($str[0]) If $str[0] >= 5 Then $linecount = $linecount + 1 FileWriteLine("tech.txt", $str[5]) $ini = IniRead($file, "tv", $str[5], "stop") If $ini = "stop" Then IniWrite($file, "tv", $str[5], $var) $ini = IniRead($file, "tv", $str[5], "stop") EndIf ControlSetText(GUICtrlRead($name), "", "RichEdit20W2", $ini) ControlClick(GUICtrlRead($name), "", "Button1") GUICtrlSetData($Input1, $ini) GUICtrlSetData($Edit1, $msnread) ControlSetText(GUICtrlRead($name), "", "RichEdit20W1", "") EndIf EndIf WEnd EndFunc ;==>start Func pause() While 1 $nMsg = GUIGetMsg() if $nMsg = $GUI_EVENT_CLOSE then FileDelete("tech.txt") Exit EndIf if $nMsg = $Button1 Then pause() EndIf if $nMsg = $Button2 Then start() EndIf Sleep(2000) WEnd EndFunc ;==>pause thanks for ur reply Edited August 7, 2008 by 7h331337 Link to comment Share on other sites More sharing options...
Triblade Posted August 7, 2008 Share Posted August 7, 2008 I haven't run it, but GUISetIcon("C:\Program Files\Common Files\LightScribe\LSLauncher.exe") won't work everywhere My active project(s): A-maze-ing generator (generates a maze) My archived project(s): Pong3 (Multi-pinger) Link to comment Share on other sites More sharing options...
7h331337 Posted August 7, 2008 Author Share Posted August 7, 2008 o ye thanks i forgot to take that away hope u try it soon Link to comment Share on other sites More sharing options...
7h331337 Posted August 7, 2008 Author Share Posted August 7, 2008 138 views and only one reply can anyone comment on this thanks Link to comment Share on other sites More sharing options...
Nutster Posted August 8, 2008 Share Posted August 8, 2008 It looks kind of simple. It shouldn't take people too long to start asking if there is a real person there because your answers will not correspond to the statements by other people.Have you heard of Eliza? It was a program that looked at what was typed to it and then adapted the question into its answer. Check out the link above for details. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... Link to comment Share on other sites More sharing options...
7h331337 Posted August 9, 2008 Author Share Posted August 9, 2008 ye i based my one on dai2 (http:\\www.dai2.co.uk) it was just something to pass the time lol i will do sum more work on it tho thanks for your reply Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now