Kostis Netzwerkberatung
Talstr. 25, D-63322 Rödermark
Tel. +49 6074 881056, FAX 881058
kosta@kostis.net (Kosta
Kostis)
http://www.kostis.net/
Meni for MS-DOS. Returns selection thru ERRORLEVEL.
Extern
batmenu col row menuentry1 [menuentry2 ...]
or
batmenu file
Cols and rows start at 1. If a given row or col is 0, the corresponding row/col will be automatically centered. Alternative file format:
Inhalt | Beispiel |
; Comments | ; Menu for Heavies |
# col row Title | # 0 0 Menu for Heavies |
Menuentry1 | 1 MS-DOS |
Menuentry2 | 2 Microsoft Windows 3.11 |
etc. |
This program is a complete rewrite of a Turbo Pascal program from Rolf Zinn (Rolf.Zinn@igmetall.de) back in 1994, which thru Borlands eternal wisdom returns a Runtime 200 error when run on fast CPUs (e. g. Pentium II 233 MHz). Since sources have not been available anymore and the program couldn't be patchesd, I rewrote the program from scratch using Borland C++ 3.1 and some of my libaries (masklib, menulib). Unfortunately batmenu.exe now is ca. 12000 Byte bigger.
Use cursor keys to mark a menu entry and Enter to select. Alternatively the first character of every menu entry can be selected directly. Pressing Enter is not needed then. The result is returned using ERRORLEVEL while 1 stands for the first menu entry.
batmenu intentionally does not clear the screen. Use the MS-DOS command CLS for that. When batmenu terminates the cursor is directly under the last line of the selection mask. The original program has been enhanced by the following keys/functions:
Key | Function |
Home | Jump to the first menu entry |
End | Jump to the last menu entry |
Esc | abort batmenu (returns ERRORLEVEL 0) |
The character "_" is generally replaced by a blank " " in all menu entry texts to emulate the original behaviour.
There is one obvious difference between the original program and my rendition. The normal text cursor blinks left to the currently marked menu entry. In the original program that cursor was deactivated. I guess this can be survived.. There are three additional error codes:
Code | Meaning |
253 | internal error (should never happen, really) |
254 | error opening menu file |
255 | syntax error |
batmenu 0 0 1_MS-DOS 2_Microsoft_Windows_3.11
A mask with two menu entries is displayed centered on the screen. Depending on which entry is selected batmenu returns ERRORLEVEL 1 or 2.
Copyright © 1998-1999 by Kostis
Netzwerkberatung
Talstr. 25, D-63322 Rödermark, Tel. +49 6074 881056, FAX 881058
kosta@kostis.net
(Kosta Kostis), http://www.kostis.net/
You may use this program free of charge at your own risk.