Behold Po Bot! You can almost have a conversation with it (although after about 4 words it may get repetative.)
Ermm.. It may not display properly on a lot of resolutions and only really works in the Windows Classic theme... Anyone know how to fix it? (MaxGUI only btw)
Ermm.. It may not display properly on a lot of resolutions and only really works in the Windows Classic theme... Anyone know how to fix it? (MaxGUI only btw)
SuperStrict AppTitle="Po Bot" Const MENU_CLEAR:Int=3 Const MENU_EXIT:Int=1 Const MENU_ABOUT:Int=2 Local reply$="Oh really?" Local window:TGadget=CreateWindow("Po Bot",100,100,600,500,Null,WINDOW_TITLEBAR|WINDOW_MENU) Local filemenu:TGadget=CreateMenu("File",0,WindowMenu(window)) CreateMenu "Clear",MENU_CLEAR,filemenu CreateMenu "Exit",MENU_EXIT,filemenu Local helpmenu:TGadget=CreateMenu("Help",0,WindowMenu(window)) CreateMenu "About",MENU_ABOUT,helpmenu UpdateWindowMenu(window) Local box:TGadget=CreateTextArea(0,0,592,434,window,2) Local user:TGadget=CreateTextField(0,435,522,22,window) Local send:TGadget=CreateButton("Send",525,435,65,22,window,BUTTON_OK) While WaitEvent() Select EventID() Case EVENT_WINDOWCLOSE End Case EVENT_MENUACTION Select EventData() Case MENU_EXIT End Case MENU_CLEAR SetGadgetText(user,"") SetGadgetText(box,"") Case MENU_ABOUT Notify "Po Bot v1.0 by Paul Leduc." End Select Case EVENT_GADGETACTION Select EventSource() Case send Local text2$=TextFieldText$(user) Local text$=Replace$(Lower$(TextFieldText$(user)),".","") text=Replace$(text,",","") text=" "+text+" " AddTextAreaText(box,"You: "+text2$+"~r") SetGadgetText(user,"") Select True Case text=" how old are you? " Or text=" when were you born? " Or text=" when were you made? " Or text=" when were you created? " Or text=" what is your age? " reply="I was created on March 31st, 2006 at 8:30 PM." Case text=" where do you live? " Or text=" where are you from? " Or text=" where are you? " reply="I am currently residing in Paul Leduc's computer which is in the basement of his house in Victoria, BC, Canada." Case text=" why? " Or text=" why not? " Or text=" but why? " reply="Just because. Can we talk about something else?" Case text=" ya " Or text=" yes " Or text=" deffinately " Or text=" sure " Or text=" yup " Or text=" ok " reply="Sweet." Case text=" no " Or text=" nope " Or text=" no way " Or text=" nah " Or text=" not really " reply="Fine." Case Instr(text,"who are you")>0 Or Instr(text,"you are")>0 reply="My name is Po and Paul Leduc is my creator." Case Instr(text,"how are you")>0 reply="Fantastic! Thanks for asking." Case Instr(text,"what's up")>0 Or Instr(text,"what is up")>0 Or Instr(text,"sup?")>0 Or Instr(text,"what up")>0 reply="Not much actually. You?" Case Instr(text," do you ")>0 reply="Not really." Case Instr(text," i am ")>0 Or Instr(text," i'm ")>0 reply="That is a very interesting thing to say about yourself." Case Instr(text,"really")>0 Or Instr(text,"seriously")>0 reply="Yes." Case Instr(text," my name ")>0 reply="It is nice to meet you." Case Instr(text," yo ")>0 Or Instr(text," hey ")>0 Or Instr(text," hi ")>0 Or Instr(text," hello ")>0 Or Instr(text," howdy ")>0 Or Instr(text," sup ")>0 reply="Hello." Case Instr(text," bye ")>0 Or Instr(text," later ")>0 Or Instr(text," peace ")>0 reply="Good bye. It has been pleasant talking with you." Default If Instr(text,"?") Then reply="I do not want to answer that question." ElseIf Instr(text,"!") Then reply="Are you getting mad at me?" Else reply="Alright." EndIf End Select AddTextAreaText(box,"Po: "+reply$+"~r") End Select End Select Wend