Contents of the BMENU54.DOC file
Batch Menu System
Pop up menus
right in your own
BMENU 5.4 2/12/90
(C) 1990 by Mark Strong
The Batch Menu System allows you to insert pop-up menus within a batch
Similar to the Norton Utilities ASK function, BMENU returns the error-
level of the item selected. BMENU allows the choice of menu location,
title, item list and optionally, color.
For example, the command (using default black and white colors):
bmenu 10 5 Title Choice1 Choice2 Choice3
would produce a menu at row 10, column 5, with title "Title" and three
choices. If the user selects choice 1, the errorlevel return is 1,
choice 2 returns errorlevel 2, and so on. If ESC is pressed, errorlevel 0
is returned to trap a "no choice made" condition. Control-Break (or ^C)
also returns errorlevel 0.
You can also use quotes to use multi-word choices:
bmenu 10 5 "My Menu" Choice1 Choice2 "Another Choice"
or use an @file:
The @file must have the format of one command line argument per line.
For the last example, filename.ext would contain:
Several example batch files are included to demonstrate various uses
of Bmenu, including @files and color definitions.
@file listings may now have multiple menus within a single file. Simply
delimit the menus with the dollar sign ($) and then a label ($mymenu).
Then call bmenu as follows:
bmenu @file mymenu
Bmenu will search the @file until the label is found and read the commands
until the end of file, or the next $ menu is found (or an $end_label). If
you need to use the dollar sign in a menu choice, use quotes around the
entire choice, and Bmenu will consider the line an argument rather than
a multiple menu label.
Nesting of menus within batch files will also work if you begin and end
the menu portion of the file with $label and $end. The two dollar sign
labels will tell Bmenu that this is the menu definition, and it will use
that data for the menu. Simply put the menu data at the end of the batch
file, or have a GOTO statement jump over the menu definition.
(For example, its fine to have "BMENU @batch.bat menu1" within batch.bat)
Comments are also allowed. Any line beginning with a colon (;) is ignored
Example of nested batch file menu "nested.bat" :
; Menu Def below
; Batch file below
bmenu @nested.bat menu1
if errorlevel 2 goto 2
if errorlevel 1 goto 1
if errorlevel 0 goto esc
echo Choices was chosen
echo Choice 2 was made
echo User ESC'd the menu
User defined colors are now available on the command line. Simply
follow the row and column numbers with a dash then the window, menu,
and selection bar color numbers, in decimal. For example,
bmenu 10 10 -3 5 65 title choice1 choice2
would produce a cyan border with magenta menu choices and a red bar with
a blue word for the current menu choice. The colors may also be included
in an @file, with the above example being:
The color combinations are made by adding the decimal values of the
foreground and background colors.
Magenta 5 Light Magenta 13
Typing `bmenu' alone lists the usage of the program.
Feel free to comment or make suggestions, but if you find the program
useful, please register. I appreciate the distribution via BBS's and
permission is granted to make copies of BMENU for this purpose. Feel
free to distribute the program to friends and others who can make use
of a batch menu system.
With the addition of multiple menu @files, Bmenu has become VERY network
compatible. Try it instead of numerous ECHO statements for menus.
Portions of this program Copyright 1986,1987 New Dimension Software.
Address correspondence to: Mark Strong
6029 Eastridge Lane
Cincinnati, OH 45247
or CompuServe mail [70043,114]
1.0- original offering, 3/22/89 or so?
2.0 - added color, if you want it, thanks to H. C. Wottle, 5/89
3.0 - changed errorlevel return value so that ESC returns 0,
and choice 1 = errorlevel 1, etc.
Thanks to W. F. Hines, 11/15/89
4.0- added @file capability, fixed choice handling for consistent
spacing, and cursor size, 12/04/89
5.0- added optional color definition on the command line, 1/14/90
5.2- fixed bug in command line @file definition, spotted by T.Scott
5.3 - added optional multi-menu @files, again thanks to T.Scott, 1/31/90
5.4 - Corrected handling of ^C and Ctrl-Brk, 2/12/90
I hope anyone reading this replaces the BMENU, BMENU2-A, BMENU2-B,
BMENU3, BMENU4, and BMENU5 files floating around with this file,
BMENU54.ZIP dated 02/12/90.
(C) Copyright 1990 by Mark Strong
City, State ________________________________
Where did you obtain this copy of Bmenu 5.4? ________________________________
Were you a user of previous Bmenu programs, and if so which version?
The cost to register one copy of Bmenu is $10.00. Registration entitles
you to legally continue to use the program, plus written notification of
future versions. For a contribution of $15.00 or more, you receive the above
benefits plus the latest version of Bmenu or the next release, whichever is
applicable, via postage paid first class mail. (Site licenses are also
available, write for info and include expected usage.) Please make checks
payable to Mark Strong, and send to the address listed below.
Thank you for your interest, and for supporting Shareware products.
Please check: Registration ($10) ____ Registration + disk ($15) ______
Site License Info ____ Expected use: _________________
Circle Disk Size (if $15.00 or more) : 5.25 3.5
Additional disks: ____ x $5 = ___________
Total Enclosed: ___________
Please remit to: Mark Strong
6029 Eastridge Lane
Cincinnati, OH 45247