CHATBOT

I have a great interest on chatbots I've tried modifying a ". Bat"code from stacks overflow which worked just fine and it's really interesting working on it I made it store names,  tell time and a lot of things it was really rewarding  how I had my friends try it out and that they were enjoying it... However the  ". Bat" code had so flows and by flows I mean set backs. Because it was based on a loop and keywords that is it worked by repeating it self and that wasn't much of a problem infact it was reason why the code was so short. The problem was with the use of the keyword that caused what you typed in to have more than one response. For example if you type in "This is your name " it will give a response for "hi" which was hello and it's name from "your name "

Below is the structure of  the ". Bat" code

@echo off

:loop

Set /p input =">"

Echo %input%|find /i "hi" >nul & & echo hello


Goto :loop

Note: The code can be a bit tricky with the spacing so if you face any trouble you can always reach me on my DM @syrix90

Comments

Popular Posts