Batch Limitation - Maximum Recursion while browsing menus
I have come across a big problem while testing my code. And this problem is the annoying message ... "Maximum recursion depth exceeded". Look how it works: @echo off REM ---------- MAIN MENU ---------- :Main echo 1.Supermarket echo 2.Exit Batch setlocal for /f %%A in ('"prompt $H & echo on & for %%B in (1) do rem"') do set "BS=%%A" set /p Menu=%BS% Type in your option {1,2} followed by ENTER: if not '%Menu%'=='' set Menu=%Menu:~0,1% if %Menu% EQU 1 ENDLOCAL & goto Super if %Menu% EQU 2 goto EOF REM ---------- SECONDARY MENU ---------- :Super echo 1.Supermarket echo a.Apple echo b.Banana