| 1. |
Solve : Need help with a bat menu? |
|
Answer» I am new to this, and saw there are some batch menu's.
echo. set /p choice= if 'choice'=='5' goto five if 'choice'=='6' goto six if 'choice'=='7' goto seven if 'choice'=='8' goto eight if 'choice'=='0' goto zero echo. goto menu :five :six :seven :eight :zero goto menu :two echo off cls :menu echo Select Option For Flash Drive Banner echo ==================================== echo [9] Copy echo [10] Paste echo [11] Zip echo [12] Execute batch file echo
echo. set /p choice= if 'choice'=='9' goto nine if 'choice'=='10' goto ten if 'choice'=='11' goto eleven if 'choice'=='12' goto twelve if 'choice'=='0' goto zero echo. goto menu :nine :ten :eleven :twelve :zero goto menu :three echo off cls :menu echo Select Option For Christmas Banner echo ================================== echo [13] Copy echo [14] Paste echo [15] Zip echo [16] Execute batch file echo
echo. set /p choice= if 'choice'=='13' goto thirteen if 'choice'=='14' goto fourteen if 'choice'=='15' goto fifteen if 'choice'=='16' goto SIXTEEN if 'choice'=='0' goto zero echo. goto menu :thirteen :fourteen :fifteen :sixteen :zero goto menu :four echo off cls :menu echo Select Option For New Years Banner echo ================================== echo [17] Copy echo [18] Paste echo [19] Zip echo [20] Execute batch file echo
echo. set /p choice= if 'choice'=='17' goto seventeen if 'choice'=='18' goto eighteen if 'choice'=='19' goto nineteen if 'choice'=='20' goto twenty if 'choice'=='0' goto zero echo. goto menu :seventeen :eighteen :nineteen :twenty :zero goto menu :exit exit Quote from: ontheroad on July 31, 2008, 11:02:49 AM For some reason, I cannot get the exit command to work with this one. You must not have anything else on a label line apart from the label.hmm...i tried what you wrote and it still won't exit. thx thowhy not do Code: [Select]if 'choice'=='Q' exit? Quote hmm...i tried what you wrote and it still won't exit.you wrote Code: [Select]:exit exitand it does not work ? EDIT: try that signs for menus Code: [Select]echo.ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ echo.ş echo.ş echo.ČÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍI tried your "if choice" and it did not work for me. :exit exit ^that did not work for me either... I do not understand why. I do appreciate you guys trying to help...i'm just stuck try Code: [Select]if /I '%choice%' equ 'Q' exitwhat os you have ?You aren't using variables properly. Clue: what is this? %YES, that worked. Thank you for taking your time and assisting me. Greatly appreciate it. Quote from: Dias de verano on July 31, 2008, 12:14:21 PM You aren't using variables properly. Clue: what is this? % My bad Quote from: macdad- on July 31, 2008, 03:45:55 PM Quote from: Dias de verano on July 31, 2008, 12:14:21 PMYou aren't using variables properly. Clue: what is this? % I am surprised at you, macdad. With a SIG like yours as well. ok ok. i just missed the %s and went with it. and yes i think that its a bit to over done(my sig) |
|