I could use some Help

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
That Guy
Posts: 2
Joined: 03 Sep 2015 18:08

I could use some Help

#1 Post by That Guy » 03 Sep 2015 18:18

I could use some help from other people so I've been working on a Pseudo AI batch file and But whenever I try to input an response to reply2 it shuts down and I can't figure out why. Here's the code.

@echo off

:start
cls
echo Hello
set /p reply1=
if %reply1%==Hello goto Options
if %reply1%==Hi goto Options

:Options
cls
Echo What you need? (Open Program/Back)
set /p reply2=
if %reply2%==Back goto start
if %reply2%==Open Program goto Prog


:Prog
cls
Echo Which file do you want me to open?
Echo Calculator
Echo Notepad
Echo Arduino
Echo Chrome
set /p ChooseProg
if %ChooseProg%==Calculator Start Calc.exe
if %ChooseProg%==Notepad Start Notepad.exe
if %ChooseProg%==Arduino Start arduino.exe
if %ChooseProg%==Chrome Start chrome.exe

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: I could use some Help

#2 Post by Squashman » 03 Sep 2015 19:36

if "%reply2%"=="Open Program" goto Prog

set /p ChooseProg=

That Guy
Posts: 2
Joined: 03 Sep 2015 18:08

Re: I could use some Help

#3 Post by That Guy » 03 Sep 2015 22:55

:) thanks I will try it.

Post Reply