Help! simple chatbot. user types in, app answers

265 views
Skip to first unread message

toxip...@gmail.com

unread,
May 2, 2014, 6:31:47 PM5/2/14
to mitappinv...@googlegroups.com
Hello,
this is my first post.
I am very new. I did all the tutorials. I tried to read up as much as i could before bothering everybody here. But I just can't seem to figure it out.
I want to make a simple chat bot, as in, have the user type in a question or phrase and then have the app respond with something. How would i go about doing this?
Lists? control? Im so confused. Im a musician not a programmer but I want to learn!
If I learn more I want to give my little chat bot an avatar that moves and simple animations that are interactive. I got some of that done. that was way easier than giving it a brain!
I tried to modify the "talk to me tut." but to no avail.
I know lots of people say why chat bot? soo boring and my brother said it was pointless. but I like it! I love robots!!
Thank you sorry for typing so much.
Warm regards,
Toxi

Taifun

unread,
May 2, 2014, 6:50:57 PM5/2/14
to mitappinv...@googlegroups.com
I want to make a simple chat bot, as in, have the user type in a question or phrase and then have the app respond with something. How would i go about doing this?

you could put your answers into a list and pick a random item from the list, then use the text to speech component to speak the text

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

toxip...@gmail.com

unread,
May 2, 2014, 7:50:45 PM5/2/14
to mitappinv...@googlegroups.com
Thanks for the info! Ok i think i am slowly getting it.
I tried to make a list.
then i had when you write something in one text box the text to speech will pic a random thing from that list. but i keep getting errors.
Also: 
if i dont use text to speech so this app can be offline and just have the chabot respond with text in another box... how can i make the text the chat bot puts in go away after say 10 seconds?
Again thank you very much for your help!

toxip...@gmail.com

unread,
May 2, 2014, 9:43:13 PM5/2/14
to mitappinv...@googlegroups.com
im still kinda lost :(
i figured out to make a random list for it to say things if you touch the screen,
but how the heck do you make it say or write when you type in something.
like:
user types: hello, how are you?
chatbot types: im ok. or great and so forth i tried  if button clicked : setuser text to then text. but then it just types the text when i click the button.
im so confused :(

Stephen Zipprich

unread,
May 3, 2014, 1:45:47 AM5/3/14
to mitappinv...@googlegroups.com
I'm not sure whether AppInventor can do what it is you're trying to do exactly, but there's a way to do it with preconfigured questions in a Listpicker.  Here's a screenshot of the blocks needed.  Just edit the questions and the answers, add or subtract from each list, and you're good to go.
textToSpeech_blocks.jpg

Taifun

unread,
May 3, 2014, 9:26:57 AM5/3/14
to mitappinv...@googlegroups.com
but how the heck do you make it say or write when you type in something.
like:
user types: hello, how are you?
chatbot types: im ok. 

you could use a clock and check, if the user entered a dot or question mark in the textbox. If yes, display your answer...
Taifun

toxip...@gmail.com

unread,
May 3, 2014, 6:05:44 PM5/3/14
to mitappinv...@googlegroups.com
Well, I give up. I don't think i can do this. I still haven't figured out how to have the app user type something in one text box and then receive a written  reply from the "bot" in another text box. i tried predefined and what not still I fail :(
oh well. I wish I had more time to play with this but I don't. Back to music (classical pianist 30 years) If you need any help in music, now  then I am the "bot master" in that field, lol i stink at comedy too. sigh. Thank you all for all your help!

Best wishes,
Toxi
Reply all
Reply to author
Forward
0 new messages