Lets Start

by BraydonG in Circuits > Computers

647 Views, 3 Favorites, 0 Comments

Lets Start

bat.PNG
Ok so today we are going to make a talking bat file here.

Need more/any help? comment and I can help you.

Making an Input Output Bat File

1st step.PNG
So today we will create a input output .bat file kinda like we are talking to a robot.
so First Enter the lines of code so we can get a response

@echo off

echo BOT: How are you?
set /p input=Type Good, Ok, or bad:

Now Check the Response

2nd step.PNG
Now after that we need to check the response and do something so
This is what I put.

if %input% == Good goto 1good
if %input% == good goto 1good
if %input% == Ok goto 1ok
if %input% == ok goto 1ok
if %input% == Bad goto 1bad
if %input% == bad goto 1bad


Moving on Conversation

Now we need to carry on the conversation and add some feedback so put:

:1good
echo That is good!

:1ok
echo Well atlest your ok.

:1bad
echo I am sorry.


This way we can still continue on the topic if the user wants too.

Detection Component

3rd.PNG
so now that we have our code we need to add a little more so copy this code
@echo off

:main
echo BOT: How are you?
set /p input=Type Good, Ok, or bad:

if %input% == Good goto 1good
if %input% == good goto 1good
if %input% == Ok goto 1ok
if %input% == ok goto 1ok
if %input% == Bad goto 1bad
if %input% == bad goto 1bad

:miss[Put a random number here and remove all [] ]
goto main

:1good
echo That is good!

:1ok
echo Well atlest your ok.

:1bad
echo I am sorry.