AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
bitwise
Posts: 2
Joined: 20 Oct 2024 12:20

Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

#16 Post by bitwise » 21 Oct 2024 17:42

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

miskox
Posts: 653
Joined: 28 Jun 2010 03:46

Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

#17 Post by miskox » 22 Oct 2024 03:24

In original version 1.4 change these lines (first and last are the same - just to be sure) (lines starting at line 131):

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%]!"
This code uses CHOICE.EXE instead of SET /P. Press 'Y' to continue or 'Q' to quit (return to previous menu).

Saso

Tanki
Posts: 3
Joined: 22 Jun 2025 02:22

Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

#18 Post by Tanki » 22 Jun 2025 02:28

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

ShadowThief
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)

#19 Post by ShadowThief » 22 Jun 2025 08:37

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"

Tanki
Posts: 3
Joined: 22 Jun 2025 02:22

Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

#20 Post by Tanki » 22 Jun 2025 09:08

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):

miskox
Posts: 653
Joined: 28 Jun 2010 03:46

Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

#21 Post by miskox » 24 Jun 2025 04:04

Did you see this note from Aacini:
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.
Download original version (1.2) and try with that.

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"
and now execute the automenu.bat with "MENU TEST" as a parameter.

What happens?

Saso

Tanki
Posts: 3
Joined: 22 Jun 2025 02:22

Re: AutoMenu.bat: simple multi-level menu system (with a coherent help on Windows-DOS commands)

#22 Post by Tanki » 24 Jun 2025 12:09

no sorry, english is not my main langage so translate all is complicated :x sorry...

thanks, all good.

Post Reply