@echo off
color 0b
title Hehe
:menu
cls
echo ==============================================================================
Set /p in= Please enter:
If "%in%"=="" goto menu
If "%in%"=="1" Goto ki
If "%in%"=="2" Goto do
If "%in%"=="3" Goto st
If "%in%"=="4" Goto cl
If "%in%"=="0" Exit
:ki
Set /p inki= Execute code:
If "%inki%"=="" goto exit
If "%inki%"=="kdl" Goto kdl
:kdl
echo Executed successfully
pause>nul
goto menu
Question: when I enter other characters for "Execute code", why does it always jump to execute :kdl? What I need is for it to exit when something else is entered. Please help.
[ Last edited by yuwujin on 2008-8-9 at 10:02 PM ]
color 0b
title Hehe
:menu
cls
echo ==============================================================================
Set /p in= Please enter:
If "%in%"=="" goto menu
If "%in%"=="1" Goto ki
If "%in%"=="2" Goto do
If "%in%"=="3" Goto st
If "%in%"=="4" Goto cl
If "%in%"=="0" Exit
:ki
Set /p inki= Execute code:
If "%inki%"=="" goto exit
If "%inki%"=="kdl" Goto kdl
:kdl
echo Executed successfully
pause>nul
goto menu
Question: when I enter other characters for "Execute code", why does it always jump to execute :kdl? What I need is for it to exit when something else is entered. Please help.
[ Last edited by yuwujin on 2008-8-9 at 10:02 PM ]
