home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
UT
/
UT126.ZIP
/
BMENU54.ZIP
/
BMENU54.DOC
< prev
next >
Wrap
Text File
|
1990-09-17
|
14KB
|
366 lines
┌─────────────────────────────────────┐
│ ░▒▓█ Batch Menu System █▓▒░ │
│ │
│ Pop up menus │
│ right in your own │
│ batch files! │
│ │
│ BMENU 5.4 2/12/90 │
│ (C) 1990 by Mark Strong │
└─────────────────────────────────────┘
Mark Strong 6029 Eastridge Lane Cincinnati, OH 45247
CompuServe [70043,114]
USENET: strong@cinnet.com
TABLE OF CONTENTS
Usage............................................................1
Multiple Menus...................................................2
Color............................................................3
Notes............................................................4
Disclaimer.......................................................5
Registration.....................................................6
Page 1
USAGE:
The Bmenu - 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.
Page 2
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
Page 3
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:
Black 0 Gray 8
Blue 1 Light Blue 9
Green 2 Light Green 10
Cyan 3 Light Cyan 11
Red 4 Light Red 12
Magenta 5 Light Magenta 13
Brown 6 Yellow 14
Light Gray 7 White 15
Background Colors:
Black 0
Blue 16
Green 32
Cyan 48
Red 64
Magenta 80
Brown 96
White 112
Page 4
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
disk vendors, 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 8921 B Harperpoint Dr Cincinnati, OH 45249
CompuServe mail: [70043,114]
USENET: strong@cinnet.com
________________________________________________________________________
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.Clark
1/29/90
5.3 - added optional multi-menu @files, again thanks to T.Clark, 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.
Page 5
DISCLAIMER:
THIS SOFTWARE, MANUAL AND SUPPORTING FILES ARE SOLD "AS IS" AND WITHOUT
WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES
WHETHER EXPRESSED OR IMPLIED. BECAUSE OF THE VARIOUS HARDWARE AND SOFT-
WARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF
FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM. ANY LIABILITY
OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR
REFUND OF THE PURCHASE PRICE.
_______
____|__ | (tm)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
Mark Strong is a member of the Association of Shareware
Professionals (ASP). ASP wants to make sure that the shareware
principle works for you. If you are unable to resolve a shareware-
related problem with an ASP member by contacting the member directly,
ASP may be able to help. The ASP Ombudsman can help you resolve a
dispute or problem with an ASP member, but does not provide technical
support for members' products. Please write to the ASP Ombudsman at
P.O. Box 5786, Bellevue, WA 98006 or send a Compuserve message via
easyplex to ASP Ombudsman 70007,3536
Page 6
REGISTRATION:
The cost to register one copy of Bmenu is $10.00. Registration is
required if you choose to continue to use the program. Registration
entitles you to legally use the program on a single computer, under a
single user application. Use on network file servers for multiple users
is provided only under a site license agreement. Please write for further
details. Registration also includes:
o A free CompuServe IntroPak, which includes a $15.00 usage
credit, available to Bmenu registered users who do not
yet subscribe to CompuServe. CompuServe will open the door
for a whole new world of information, services, and interesting
people. CompuServe is also the best place to obtain technical
support from the author of Bmenu (and many other vendors and
developers). This CompuServe IntroPak (a $39.95 value) is provided
to Bmenu registered users compliments of CompuServe, Inc.
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. Use the following
registration form to submit your payment.
You can also purchase a registered disk from the Public (software)
Library using your MasterCard, VISA, Amex or Discover. Read the
following registration form for more information.
Thank you very much for supporting shareware!
Bmenu 5.4
Registration Form
(C) Copyright 1990 by Mark Strong. All Rights Reserved.
Name ________________________________
Address ________________________________
City, State ________________________________
Zip ________________________________
Where did you obtain this copy of Bmenu 5.4? ________________________________
____________________________________________________________________________
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 and phone support after initial mail or CompuServe contact.
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 or money orders payable
to Mark Strong, and send to the address listed at the bottom of the page.
Thank you for your interest, and for supporting Shareware products.
You can also order with MasterCard, VISA, Amex or Discover from the Public
(software) Library (PsL) by calling 1-800-2424-PsL or 713-524-6394 or by
FAX to 1-713-524-6398 or by CIS Email to 71355-470. These numbers are for
orders only. To insure that you get the latest version, PsL will notify
us the day of your order and we will ship the product directly to you.
Any questions about the status of the shipment of the order, refunds, product
details, technical support, volume discounts, dealer pricing, site licenses,
etc, must be directed to Mark Strong at the address below. You can also mail
credit card orders to PsL at P.O. Box 35705, Houston, TX 77235-5705.
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
or call 1-800-2424-PsL to order from the Public (software) Library