This is great! Thanks for making my ask work!
Brings back a lot of memories from the old Tandy 1000 pre-windows batch menu that I used. If I remember correctly that menu had a windows (boxy) look using the ascii borders.
Like these https://en.wikipedia.org/wiki/Box-drawing_characters
AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
Moderator: DosItHelp
Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
In original version 1.4 change these lines (first and last are the same - just to be sure) (lines starting at line 131):
This code uses CHOICE.EXE instead of SET /P. Press 'Y' to continue or 'Q' to quit (return to previous menu).
Saso
Code: Select all
set "choice=!choices:~%errorlevel%,1!"
if not "%choice%"=="0" if not "%choice%"=="%LetterToExitMainMenu%" choice.exe /N /C YQ /M "Press Y to continue or Q to Quit: "
if not "%errorlevel%"=="1" exit /B
if not "%level%"=="0" if "%choice%"=="0" exit /B
if "%level%"=="0" if "%choice%"=="%LetterToExitMainMenu%" exit /B
set "option=!option[%choice%]!"
Saso
Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
Hello, trying to launch 1.5 but bat closed directly, no error, nothing displayed...
Downloaded .zip, extracted all files/folder, opened AutoMenu.bat with notepad++, Select all and paste v1.5 version, CTRL + S and double clik on .bat file as Administrator...
Thanks
Downloaded .zip, extracted all files/folder, opened AutoMenu.bat with notepad++, Select all and paste v1.5 version, CTRL + S and double clik on .bat file as Administrator...
Thanks
-
- Expert
- Posts: 1167
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
You're supposed to pass the name of the folder that contains the menu layout as the argument. The example that you get when you run the script by itself (from the command prompt; never run scripts by double-clicking them) is AutoMenu.bat "Windows-DOS Commands Help"
Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
oh ok thanks, so ive try your cmd:
W I N D O W S - D O S C O M M A N D S H E L P
La variable d’environnement option[ n’est pas définie.
Select the desired option (X to exit):
Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
Did you see this note from Aacini:
Or you could test with this:
put automenu.bat into an empty folder, create and run this batch file (it will create a test menu):
and now execute the automenu.bat with "MENU TEST" as a parameter.
What happens?
Saso
Download original version (1.2) and try with that.A small drawback in the scheme used is that the maximum lenght of nested names (260 characters) may be reached if you use very long names with several levels deep. If the "Windows-DOS Commands Help" menu system don't show full names or don't works correctly, try to move it to an upper level folder.
Or you could test with this:
put automenu.bat into an empty folder, create and run this batch file (it will create a test menu):
Code: Select all
@echo off
mkdir "MENU TEST"
break "MENU TEST\1-option1-some text">"MENU TEST\1-option1-some text.cmd"
break "MENU TEST\2-option2-some text">"MENU TEST\2-option2-some text.cmd"
break "MENU TEST\3-option3-some text">"MENU TEST\3-option3-some text.cmd"
break "MENU TEST\4-option4-some text">"MENU TEST\4-option4-some text.cmd"
What happens?
Saso
Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)
no sorry, english is not my main langage so translate all is complicated
sorry...
thanks, all good.

thanks, all good.