Dec 192017
 
The Batch Menu System allows you to insert pop-up menus within a batch file. Excellent if you write a lot of batch files.
File BMENU54.ZIP from The Programmer’s Corner in
Category Batch Files
The Batch Menu System allows you to insert pop-up menus within a batch file. Excellent if you write a lot of batch files.
File Name File Size Zip Size Zip Type
BMENU.EXE 26441 12257 deflated
BMENU54.DOC 8848 3144 deflated
EXAMPLE1.BAT 601 233 deflated
EXAMPLE2.BAT 526 222 deflated
EXAMPLE3.BAT 999 371 deflated
EXAMPLE4.BAT 1026 379 deflated
LICENSE.DOC 2936 1304 deflated
MENUS.FIL 454 263 deflated
MULTI.BAT 948 395 deflated
NESTED.BAT 428 230 deflated
PACKING.LST 680 274 deflated
REGISTER.DOC 2011 710 deflated

Download File BMENU54.ZIP Here

Contents of the BMENU54.DOC file





Batch Menu System

Pop up menus
right in your own
batch files!

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
file.

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:

bmenu @filename.ext

The @file must have the format of one command line argument per line.
For the last example, filename.ext would contain:

10
5
My Menu
Choice1
Choice2
Another Choice


Several example batch files are included to demonstrate various uses
of Bmenu, including @files and color definitions.
MULTIPLE MENUS:

@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
by bmenu.

Example of nested batch file menu "nested.bat" :

echo off
goto main
;
; Menu Def below
;
$menu1
10
10
Title
Choices
Choice 2
$end_menu
;
; Batch file below
;
:main
bmenu @nested.bat menu1
if errorlevel 2 goto 2
if errorlevel 1 goto 1
if errorlevel 0 goto esc
:2
echo Choices was chosen
goto end
:1
echo Choice 2 was made
goto end
:esc
echo User ESC'd the menu
:end


COLOR:

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:

10
10
-3
5
65
title
choice1
choice2


The color combinations are made by adding the decimal values of the
foreground and background colors.


Color Attributes


Foreground Colors:

Black0Gray8
Blue1Light Blue9
Green2Light Green10
Cyan3Light Cyan11
Red4Light Red12
Magenta 5 Light Magenta 13
Brown6Yellow 14
Light Gray7White15


Background Colors:

Black0
Blue16
Green32
Cyan48
Red64
Magenta 80
Brown96
White112


NOTES:

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]
________________________________________________________________________


Update History:

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
1/29/90
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.

Bmenu 5.4
Registration Form

(C) Copyright 1990 by Mark Strong


Name ________________________________

Company ________________________________

Address ________________________________

City, State ________________________________

Zip ________________________________



Where did you obtain this copy of Bmenu 5.4? ________________________________

____________________________________________________________________________


Were you a user of previous Bmenu programs, and if so which version?

___________________________________________________________________________


Comments/Suggestions: ______________________________________________________

____________________________________________________________________________


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


 December 19, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)