home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
UT
/
UT191.ZIP
/
MENU-MAN.ZIP
/
MENU-MAN.DOC
next >
Wrap
Text File
|
1991-05-24
|
24KB
|
593 lines
Ç ────────────────────────────────────────────
Ç ┼┐────────────────────────────────────────────
╔╬╗ ┴
╨║╨ ┐
╔╩╗ ┴
╨ ╨
▒▒▄ ▒▒▄▒▒▒▒▒▒▒▒▄▒▒▄ ▒▒▄▒▒▄ ▒▒▄ ▒▒▄ ▒▒▄ ▒▒▄ ▒▒▄ ▒▒▄
▒▒▒▄ ▒▒▒█▒▒█▀▀▀▀▀▀▒▒▒▄ ▒▒█▒▒█ ▒▒█ ▒▒▒▄ ▒▒▒█ ▒▒▒▒▄ ▒▒▒▄ ▒▒█
▒▒▒█ ▒▒▒█▒▒▒▒▒▒▒▒▄▒▒█▒▒▄▒▒█▒▒█ ▒▒█ ▒▒▒█ ▒▒▒█ ▒▒█▀▒▒▄ ▒▒█▒▒▄▒▒█
▒▒█▒▒▄▒▒█▒▒█▀▀▀▀▀▀▒▒█ ▀▒▒▒█▒▒█ ▒▒█ ▒▒█▒▒▄▒▒█ ▒▒▒▒▒▒█ ▒▒█ ▀▒▒▒█
▒▒█▒▒█▒▒█▒▒▒▒▒▒▒▒▄▒▒█ ▒▒█▒▒▒▒▒▒▒▒█ ▒▒█▒▒█▒▒█▒▒█▀▀▀▒▒▄▒▒█ ▒▒█
▀▀ ▀▀ ▀▀ ▀▀▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀
Welcome to MENU-MAN, a utility routine to display
custom user selection menus from batch files!
MENU-MAN allows the display of user selection menus from within batch
files. These menus are controlled by command line options and can contain
a title and up to twenty-three selection option lines that are generated from
REM lines in the batch which follow the call to MENU-MAN. Options
include a user response time limit, menu positioning, erasing the screen
before/after menu display, and menu sound, color and type customization.
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
M E N U - M A N U T I L I T Y M A N U A L
MENU-MAN Version 1.20
Released April 26, 1991
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
Copyright (C) 1990-1991
by Micrometric
All rights reserved.
MENU-MAN is distributed as SHAREWARE and, as such, may be copied
and shared on a private non-commercial basis with others in its unmodified
form. Liability is limited to replacing the software for registered users.
There is no liability for any damage or loss caused by this software, directly
or indirectly.
┌───────┐
┌────┴──┐ │
│ ┌────┴──┐ │
│ │ │ │ Member, Association of Shareware Professionals
│ │ o ├─┘
└──┤ │ │
└───────┘
Please send comments, manual corrections and enhancement suggestions to:
Kirk Groome
Micrometric
98 Dade Avenue
Sarasota, FL 34232
Voice/FAX (813) 377-2515
REGISTRATION SERIAL NUMBER
┌──────────────────────────────────────────────────────────┐
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────┘
PKZIP, PKUNZIP and PKSFX are trademarks of PKWARE, Inc.
MS-DOS is a registered trademark of the Microsoft Corporation.
IBM PC, XT, AT and PC-DOS are registered trademarks of the IBM Corporation.
TABLE OF CONTENTS
INTRODUCTION . . . . . . . . . . . . . . . 5
Major Features. . . . . . . . . . . . . 5
System Requirements . . . . . . . . . . 5
Manual Format . . . . . . . . . . . . . 6
Page layout. . . . . . . . . . . . . 6
Brackets and parentheses . . . . . . 6
Computer key conventions . . . . . . 6
Action steps . . . . . . . . . . . . 6
■■■■-MAN programs. . . . . . . . . . 6
Shareware distributed documentation manual 6
Shareware . . . . . . . . . . . . . . . 7
INSTALLING THE SYSTEM . . . . . . . . . . 9
RUNNING MENU-MAN . . . . . . . . . . . . 11
Identifier. . . . . . . . . . . . . . 11
Batch-file-name . . . . . . . . . . . 11
Options . . . . . . . . . . . . . . . 12
Title-line. . . . . . . . . . . . . . 12
Selection-X-line. . . . . . . . . . . 12
MENU-MAN OPTIONS . . . . . . . . . . . . 13
Display Time. . . . . . . . . . . . . 13
Exploding Window Time . . . . . . . . 14
Sound . . . . . . . . . . . . . . . . 14
Menu Position . . . . . . . . . . . . 15
Menu Colors . . . . . . . . . . . . . 15
Menu Highlight Location . . . . . . . 17
Display Text Only . . . . . . . . . . 17
Shadow Border . . . . . . . . . . . . 18
Erase Before. . . . . . . . . . . . . 18
Erase After . . . . . . . . . . . . . 18
MENU-MAN OPERATION . . . . . . . . . . . 19
ERRORLEVEL Testing. . . . . . . . . . 19
EXAMPLE . . . . . . . . . . . . . . . 19
Shareware message . . . . . . . . . . 20
INTRODUCTION
MENU-MAN allows the display of user selection menus from within batch
files. These menus are controlled by command line options and can contain
a title and up to twenty-three selection option lines that are generated from
REM lines in the batch which follow the call to MENU-MAN. Options
include a user response time limit, menu positioning, erasing the screen
before/after menu display, and menu sound, color and type customization.
Major Features
■ Over 200 different menus per batch file.
■ Simple format:MENU-MAN # filename options
REM TITLE
REM USER SELECTION 1
REM USER SELECTION 2
REM ...
■ User defined window selection menus embedded in batch files.
■ Automatic color display on systems so equipped.
■ User control over most window menu parameters on a per menu basis.
■ Display selection menus or informational messages.
■ MENU-MAN sets the ERRORLEVEL environment variable for easy
user selection testing in the batch file.
■ User selections are imbedded in the batch file, not seperated into an-
other file.
■ Menu may be displayed for a limited time to aid in uses such as AU-
TOEXEC for unattended operation.
■ A sound may be made when the window is displayed. The pitch and
duration of the sound is adjustable.
■ The menu colors are adjustable.
■ The screen screen may be erased before the menu is displayed or the
menu can overlay the current screen display.
■ The menu may be erased after user selection or left.
■ The position of the menu - Up, center, down and left, center, right -
may be specified.
System Requirements
MENU-MAN will run on an IBM PC, XT, AT or true compatibles. It has
been tested with PC-DOS/MS-DOS operating systems, version 3.0 through
version 5.0. The program will determine what type of display monitor is
available and adjust itself accordingly.
Manual Format
This manual is divided into several introductory chapters followed by chap-
ters for operating MENU-MAN. The format of these chapters and the
information presented therein has been standardized using the following
conventions.
Page layout - Each page has a header detailing the chapter and the pro-
gram version covered. A footer displays the manual page number.
Brackets and parentheses - Brackets, [...], are used in the manual to specify
what should be entered in response to the current prompt. If a character
string is to be entered, the type of character is noted, such as ALPHA, NU-
MERIC, ANY, etc. Parentheses, (..), are used for comments.
Computer key conventions - Keys specified in the manual text that are not
in entry brackets are shown as reversed, such as ■ESCAPE■. All key referenc-
es are in capital letters for clarity.
Action steps - Some procedures may require selection from a menu of op-
tions, inputting data or following a sequence of steps. Most manual sections
will first give an overview of the function or task under discussion and then
detail the various action operating procedures. In order to make this manu-
al easier to use a symbol, ■ , marks the beginning of each of these action
operating procedures.
■■■■-MAN programs - The general group of shareware programs by Mic-
rometric is referred to by the name ■■■■-MAN. It may also be used in
reference to a specific program in that group.
Shareware distributed documentation manual - The documentation file in-
cluded on the shareware distribution diskette contains the same information
as the printed and bound manual supplied as part of registration with three
exceptions, the result of the word processor, formatting and printer used.
The first is that the page headers and footers are NOT present in the
shareware version (If LASR-MAN is used to print the documentation, use
of its page header option will supply the page numbers). The second is that
all of the control display characters (ASCII 1-31) and the reverse print
keyboard codes are NOT shown properly. Finally, bolding, underlining and
special symbols are NOT present.
Shareware
MENU-MAN is being distributed as SHAREWARE. The SHAREWARE
concept allows users to examine a program on a trial basis at no (or mini-
mal) charge before purchasing it. In addition, by decreasing marketing costs,
professional quality software may be distributed for a fraction of the cost
of a comparable commercial product. Regardless of whether you register
the program, please help distribute MENU-MAN by sharing unmodified
copies of it and its files with others. If you find MENU-MAN of value, you
must register your program use. This will provide you with:
* A 7" x 8 1/2" printed and bound manual.
* MENU-MAN phone or mail support for one year.
* Notification of the next MENU-MAN release.
* Sincere thanks for your support of the SHAREWARE concept.
Program Registration . . . . . . . . . . . $15.
Latest Version Diskette. . . . . . . . . . $10.
Package (All the above). . . . . . . . . . $20.
ADDRESS: Micrometric
98 Dade Avenue
Sarasota, FL 34232
PHONE: Voice/FAX (813) 377-2515
For ease in program registration, the INST-MAN program may be used to
generate an order form.
This program is produced by a member of the Association of Shareware
Professionals (ASP). ASP wants to make sure that the shareware principal
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 545 Grover Road, Musk-
egon, MI 49442-9427, or send a Compuserve message via easyplex to ASP
Ombudsman 70007,3536.
INSTALLING THE SYSTEM
For the procedures to install MENU-MAN and print this documentation,
see the README file on the shareware distribution diskette.
FOR PROPER OPERATION, ALL REQUIRED MENU-MAN
FILES *MUST* BE PLACED ON PATH REFERENCED SUB-
DIRECTORIES!
RUNNING MENU-MAN
The syntax to execute the MENU-MAN utility program from a batch file
is:
...
MENU-MAN identifier batch-file-name [option a] [option b] [...]
REM title-line
REM selection-1-line
REM selection-2-line
...
(BATCH FILE LINE THAT DOES NOT START "REM...")
...
The program name and all command line parameters must be separated by
at least one space. If no parameters are present, a MENU-MAN syntax
summary will be displayed.
Identifier
identifier is a unique character used to identify the location in the batch-
file-name batch file from where this call was made. MENU-MAN searches
this batch file for a line with its name (MENU-MAN) and this identifier.
The title and the user selection options are then taken from following REM
statements.
Batch-file-name
batch-file-name is the name of the batch file which this statement is in. The
easiest was to specify this parameter is to use the batch file variable %0,
to which DOS assigns the batch file name. MENU-MAN adds the extension
.BAT if it is not present, and will first search the current drive/directory for
this name. If it is not found, MENU-MAN will then search each
drive/directory in the PATH statement in turn. If no match is found, an
error message is displayed and MENU-MAN returns control to the batch
file that called it.
If your batch file changes the current drive/directory to one that is not in
the PATH before it executes MENU-MAN , you must specify the full path
drive/directory along with the batch-file-name on the command line. Options
options may be specified after the first two required parameters and may
appear in any order. The individual options are covered in the next
section.
Title-line
Following the MENU-MAN command line should be a batch file REM
statement. The contents of this statement will be used as the title of the
displayed menu.
Selection-X-line
Following the REM title statement should be a set of batch file REM
statements that are the desired selection options for this menu. Each REM
will be displayed on a separate menu line in the order that they appear in
the batch file. The first numeric or capitalized alpha character that has not
been highlighted on previous menu lines will be highlighted on this menu
line and may be used for user selection. Up to twenty-three menu lines may
be specified. MENU-MAN will scan for REM menu lines until the maxi-
mum number is reached or a non REM statement line encountered in the
batch file.
MENU-MAN OPTIONS
The MENU-MAN options allow customizing the individual menus. None of
these options are required: MENU-MAN will produce selection menus
without any options being specified. Options may be specified as either
upper or lower case letters.
Display Time
The selection menu is normally displayed with a bottom border line of
"Please Enter Choice!". For use in batch file such as AUTOEXEC.BAT
where you normally want a default selection and the ability to run without
user input, a display time option may be used. When used, this option
changes the bottom border line to read "Selection Time Remaining #"
where # is the number of seconds remaining to make a choice. If no user
choice is before the option time expires, MENU-MAN returns to the batch
file with ERRORLEVEL equal to zero.
The display time option is:
T#####
where:##### is the number of seconds to wait for a user
response and may range from zero to 32,767.
EXAMPLE: An option of T12 will wait twelve seconds for a user selection.
Exploding Window Time
The selection menu is built in stages so as to give an "exploding" appear-
ance. Normally, there is no delay time between these stages. However, in
order to extend the "explosion", this option allows a time delay to be placed
between the stages. The default is 20 milliseconds.
The exploding window time option is:
W#####
where:##### is the number of milliseconds to delay be-
tween building stages of the window menu and
may range from zero to 32,767.
EXAMPLE: An option of W200 will delay 200 milliseconds between stages
in building the menu window.
Sound
A short beep sound is made to get the users attention when the selection
menu is displayed. Both the pitch and the length of this sound may be
changed. If either value is set to zero, no sound will be produced when the
menu is displayed.
The sound option is:
B#####,#####
where: the first ##### is the pitch in cycles per second
and the second is the length in milliseconds.
These numbers may range from zero to 32,767.
The default values are a pitch of 700 Hz and
200 milliseconds.
EXAMPLE: An option of B512,500 will sound a half second 512 HZ tone
as the selection menu is displayed.
Menu Position
The default selection menu position is the center of the screen. The menu
position option allows menus to be placed at other locations.
The menu position option is:
P{V},{H}
where:{V} is the vertical position code;
T - Top
C - Center
B - Bottom
{H} is the horizontal position code;
L - Left
C - Center
R - Right
EXAMPLE: An option of PT,R will display the selection menu in the up-
per right corner of the screen.
Menu Colors
There are five areas of the selection menu that can have colors assigned to
them. These areas and their default colors are shown below.
┌──────────────────────────────────────────────────────────────────┐
│ AREA CODE FOREGROUND BACKGROUND VALUE │
├──────────────────────────────────────────────────────────────────┤
│ Non-highlighted test N Light grey Blue 28 │
│ Highlighted text H White Blue 31 │
│ Border B Yellow Blue 30 │
│ Title T Light cyan Blue 27 │
│ Shadow border S Light grey Black 7 │
│ Option highlight bar O White Red 79 │
└──────────────────────────────────────────────────────────────────┘
The color codes are shown in the table below. To have an area blink, add
128 to the color code chosen.
┌────────────┬───────────────────────────────────────────────────────┐
│ │ - - - - B A C K G R O U N D - - - - │
│ │ │
│ FOREGROUND │ BLACK BLUE GREEN CYAN RED MAGENTA BROWN WHITE │
│ ├───────────────────────────────────────────────────────┤
│ BLACK │ 0 16 32 48 64 80 96 112 │
│ BLUE │ 1 17 33 49 65 81 97 113 │
│ GREEN │ 2 18 34 50 66 82 98 114 │
│ CYAN │ 3 19 35 51 67 83 99 115 │
│ │ │
│ RED │ 4 20 36 52 68 84 100 116 │
│ MAGENTA │ 5 21 37 53 69 85 101 117 │
│ BROWN │ 6 22 38 54 70 86 102 118 │
│ LIGHTGREY │ 7 23 39 55 71 87 103 119 │
│ │ │
│ DARKGREY │ 8 24 40 56 72 88 104 120 │
│ LIGHTBLUE │ 9 25 41 57 73 89 105 121 │
│ LIGHTGREEN │ 10 26 42 58 74 90 106 122 │
│ LIGHTCYAN │ 11 27 43 59 75 91 107 123 │
│ │ │
│ LIGHTRED │ 12 28 44 60 76 92 108 124 │
│ LIGHTMAGENTA 13 29 45 61 77 93 109 125 │
│ YELLOW │ 14 30 46 62 78 94 110 126 │
│ WHITE │ 15 31 47 63 79 95 111 127 │
└────────────┴───────────────────────────────────────────────────────┘
The color option is:
C@###
where:@ is the menu area code from the first table above
(N, H, B, T or S).
### is the color value from the second table above.
EXAMPLE: An option of CT113 will display the title in dark blue on a
white background.
Menu Highlight Location
The default menu highlight location is the first menu line. This option
allows the highlight to be initially located on any valid menu line when the
menu is displayed.
The menu highlight location option is:
L##
where:## is the menu line to highlight.
EXAMPLE: An option of L8 will highlight the eight menu line.
Display Text Only
MENU-MAN normally displays a menu consisting of a title line and a
variable number of menu lines and then waits for the user to select a menu
line. This option allows the text and the menu lines to be displayed without
requesting a selection from the user.
The display text only option is:
M#####
where:##### is the number of seconds to display the text
and the menu lines and may range from zero to
32,767.
EXAMPLE: An options M5 will display the menu title and text lines for
five seconds. There is no user selection required nor is there
a countdown of the display time left.
Shadow Border
The default menu display uses a shadow border as if a light was shining on
the raised menu from the upper left. This option removes this shadow.
The shadow border option is:
S-
EXAMPLE: An option of S- will not display a shadow border.
Erase Before
By default, the selection menu overlays the current screen display. This
option will first clear the screen before the selection menu is displayed.
The erase before option is:
EB
EXAMPLE: An option of EB will erase the screen before the selection
menu display.
Erase After
By default, the selection menu is left on the screen display after the user
selection has been made. This option will remove the selection menu after
a choice has been made and the screen will be restored to what it was
before the menu was displayed. A line is then displayed showing the user
choice that was made.
The erase after option is:
EA
EXAMPLE: An option of EA will remove the user selection menu after a
choice of the third option line has been made and then dis-
play the following line:
Your Choice was "option 3 menu line"!
MENU-MAN OPERATION
After MENU-MAN has displayed the menu and accepted the users
response, it will exit and return to the batch file with the ERRORLEVEL
parameter set to the number of the menu line selected by the user.
ERRORLEVEL Testing
To determine which selection the user has made, you must test the variable
ERRORLEVEL in the batch file. To determine if the user selected option
four, use:
if ERRORLEVEL 4 if NOT ERRORLEVEL 5 goto SELECT4
When using the display time option, to determine if the user made a choice
(this can be used as a default), use:
if ERRORLEVEL 0 if NOT ERRORLEVEL 1 goto NOCHOICE
EXAMPLE
This batch file segment will produce the selection menu show below -
...
MENU-MAN C %0
rem This line will be the Title
rem option 1 menu line
rem option 2 menu line
rem option 3 menu line
rem option 4 menu line
if ERRORLEVEL 1 if NOT ERRORLEVEL 2 goto SELECT1
if ERRORLEVEL 2 if NOT ERRORLEVEL 3 goto SELECT2
...
┌──────────────────────────────────┐
│ ╒═This line will be the Title═╕ │
│ │ option 1 menu line │█ │
│ │ option 2 menu line │█ │
│ │ option 3 menu line │█ │
│ │ option 4 menu line │█ │
│ ╘═══ Please Enter Choice! ════╛█ │
│ ███████████████████████████████ │
└──────────────────────────────────┘
Shareware message
A shareware message may be randomly displayed at the start of MENU-
MAN.
■ To continue with the MENU-MAN program after the display of the
shareware message, press any key.
By registering your use of MENU-MAN, you will be able to use the regis-
tration serial number to suppress the shareware message display.