Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
28
Task/Menu/Batch-File/menu.bat
Normal file
28
Task/Menu/Batch-File/menu.bat
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
::The Main Thing...
|
||||
set choices="fee fie","huff and puff","mirror mirror","tick tock"
|
||||
set "quest=Which is from the three pigs?"
|
||||
call :select
|
||||
pause>nul
|
||||
exit /b 0
|
||||
::/The Main Thing.
|
||||
|
||||
::The Function...
|
||||
:select
|
||||
set number=0
|
||||
for %%A in (%choices%) do set tmpvar=%%A&set /a number+=1&set opt!number!=!tmpvar:"=!
|
||||
:tryagain
|
||||
cls&echo.
|
||||
for /l %%A in (1,1,%number%) do echo. Option %%A - !opt%%A!
|
||||
echo.
|
||||
set /p input=%quest%
|
||||
for /l %%A in (1,1,%number%) do (
|
||||
if !input! equ %%A echo.&echo.You chose option %%A - !opt%%A!&goto :EOF
|
||||
)
|
||||
echo.
|
||||
echo.Invalid Input. Please try again...
|
||||
pause>nul
|
||||
goto tryagain
|
||||
::/The Function.
|
||||
Loading…
Add table
Add a link
Reference in a new issue