home *** CD-ROM | disk | FTP | other *** search
-
-
- BATMNU.EXE
- Warren Small
- (c) 1991
-
- This program is a menuing system for use with your batch files. It is
- not intended to be a 'shell', although with some very ambitious batch file
- programming, it could be used as one. Its purpose is to provide sophisticated
- flow control and give batch files a professional appearance by creating a
- point-and-shoot menu with up to 26 options per menu. The cursor keys and the
- 'HOME' and 'END' keys can then be used to make the selection. Each option
- also can be selected by a 'hotkey' defined by your menu.
-
- Syntax: BATMNU [d:] [path] filename [label]
-
- The program defaults to an extension of 'mnu' if none is provided. The
- filename can be a separate file or, if you prefer, the menu can be within the
- calling batch file. You will have to code the batch file so those lines are
- never executed, of course. The optional label parameter can be used if you
- wish to put more than one menu within the file. Bracket you menu lines with
- ':label' and ':end_label'. BatMenu will search your path for the file if it's
- not in the current directory. The label can be up to 15 characters.
-
- The format for the menu is as follows:
-
- :menu {keyword to mark where the program should start reading}
- window,tRED,hWHI,... {colors and window appearance definition}
- title,title text
- option,option text,# {# indicates hotkey position in option text}
- option,...
- .
- .
- .
- :end_menu {Program stops reading and closes the file}
-
- The definition can be organized in almost any order as long as it is
- placed between the ':menu' and ':end_menu' keywords (or the label provided on
- the command line). The window line should appear before the options if you
- use the 'l' or 'a' parameter. Maximum title length is 55 characters. If you
- leave the title out, your menu will contain only your defined options.
- Maximum option length is 25 characters.
-
- Hotkey position starts at 1 and will default to that position if
- omitted. This is also the default if you miscount and enter a number longer
- than the text. Alternately, the hotkey can be defined with a character. The
- program will select the first character that matches. You will have to use a
- number if you want a later occurring character of the same type as your
- hotkey. If the program cannot find any options in the file, a Menu Format
- Error message will be displayed. If a hotkey character is duplicated, the
- menu with return the value associated with the first option with that value.
- You can let BatMenu select the hotkeys, if you wish, with the 'a' window
- parameter. The choices can be overridden by the option line selection and the
- menu will default to letter choices if it runs out of characters to pick
- from.
-
- Page 1 of 3
- Ver. 1.3
-
- BATMNU.EXE
- Warren Small
- (c) 1991
-
- The 'window' line in your menu will define the colors and appearance of
- your menu. The color options are:
-
- f - foreground color of window
- b - background color of window, only the first 8 colors are valid.
- t - title color
- o - option color
- h - hotkey color
- k - screen color (clears screen), the first 8 for this too.
-
- Window appearance options are:
-
- e - puts a solid color border around the screen's edge
- s - shadow on
- c - center each option individually
- w - display menu in wide, 2 column format, default for > 12 options
- l - default to letter selection of options
- n - default to number selection of options, maximum of 10 options
- a - automatic selection of hotkeys
- m - menu frame type, 1 - ┌─, 2 - ╔═, 3 - ╒═, 4 - ╓─, 5 - █▀
- ~ - Allows use of the Escape key to exit menu, returns errorlevel 0
-
- Color options should be followed by one of the color values shown in the
- chart below. Hotkeys can be made invisible by using 'hinv' on the window
- line. The hotkeys will still select the options but the menu will not
- indicate them. This gives you the look of a simpler 'light bar' style menu.
- Additionally, the 'k' option can include a fill character after the color to
- give the screen background more interest than a flat color. Use of the drop
- shadow is more dramatic too.
-
- The 'l' option can be useful when you have a large number of options or
- if you just prefer it that way. The 'n' option is for those who prefer
- numbered menus. The 'c' option is overridden if you use 'l' or 'n'. With
- these options, your maximum option length is 22 characters and the hotkey
- will be set to 1.
-
- The 'e' option must appear before the 'k'. It will use the background
- color selected by 'k'.
- COLOR VALUES
-
- 0 or bla = Black 8 or BLA = Grey
- 1 or blu = Blue 9 or BLU = Bright Blue
- 2 or gre = Green 10 or GRE = Bright Green
- 3 or cya = Cyan 11 or CYA = Bright Cyan
- 4 or red = Red 12 or RED = Bright Red
- 5 or mag = Magenta 13 or MAG = Bright Magenta
- 6 or yel = Brown 14 or YEL = Yellow
- 7 or whi = White 15 or WHI = Bright White
-
-
- Page 2 of 3
- Ver. 1.3
-
- BATMNU.EXE
- Warren Small
- (c) 1991
-
- Default colors are provided (fYEL, bblu, tWHI, oCYA, hRED) and the
- options will be left-justified. The menu will be in single column format
- unless it exceeds 12 options. It will have a double line frame.
-
- DOS ERRORLEVEL is set on exit from BATMNU with level 1 corresponding to
- the first option, etc. A level 0 is set whenever the program encounters an
- error (file not found or parameter error) so you should plan your batch file
- accordingly. If the Escape key option is used, this will always return a
- level 0. Be sure to order your errorlevel statements from largest to
- smallest. See your DOS manual for more information.
-
- Executing the program with no parameter will display a help screen and
- example menu. A couple of example files are included in this archive, one
- showing a separate menu file and another a menu within a batch file.
-
- This program is provided as "shareware". Please try it out for a week or
- two. If you like it and use it, I would appreciate you sending $10 my way as
- a vote of confidence for a job well done. Paying this fee also will encourage
- me to make improvements and/or correct problems for future versions. Feel
- free to give it to friends or upload it to other BBS's provided that no fee
- is charged for distribution and it is not modified in any way.
-
-
- Ver. 1.3
- April 22, 1991
-
- Warren Small
- 35 Benjamin Street
- Manchester, NH 03103
-
- CIS 71076,407
- GENIE W.SMALL
- Prodigy RSJW31A
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 of 3
- Ver. 1.3
-