home *** CD-ROM | disk | FTP | other *** search
-
-
- 4MENU DOCUMENTATION
-
- Copyright 1991 by Jeffery G. Smith
- All rights reserved.
-
- The files which make up this program release may be distributed freely
- only if they are unaltered and together in a copy of the original
- compressed file 4MENU10W.ZIP
- 4MENU10W.DOC, 4MENU.BAS, 4MENU.EXE
- SAMPLE.MNU, SAMPLE.BTM
- No fees may be charged for distribution without consent of the author
- except to cover the cost of materials.
-
- This program is provided as is and the author assumes no
- responsibility for its performance.
-
- If you find this program useful please send whatever you feel it is
- worth to
- Jeffery G. Smith
- DISTWSMR
- 174 West Eighteenth Avenue
- Columbus, Ohio 43202
-
-
-
-
- 2
-
- 1. PURPOSE
- Although 4DOS has advanced and extensive provisions for making
- attractive and user friendly menus in batch files with the
- DRAWBOX, SCRPUT, SCREEN and INKEY functions, it can be more than
- a little tedious to calculate the parameters to create menus
- using these functions. This program automates the process using
- a description of the menu to produce a batch file with the proper
- commands to implement it.
-
- Specifically the batch file does the following:
-
- 1. Creates a menu using the DRAWBOX, SCRPUT and SCREEN
- functions.
- 2. Gets a response using the INKEY function.
- 3. Performs an associated action.
- 4. Beeps if a incorrect key is pressed and redraws the menu.
-
-
- 2. USAGE
- usage: 4menu [description-file]
-
- If no file is given on the command line, you will be prompted for
- one. In either case, if no extension is given '.mnu' will be
- assumed.
-
- The format of the file is:
- screen foreground color
- screen background color
- menu foreground color
- menu background color
- border foreground color
- border background color
- border style
- title
- choice1
- action1
- key1
- ...
-
- The colors available are:
- Black, Blue, Green, Red, Magenta, Cyan, Yellow, White
- The foreground versions may be preceded by the attributes:
- bright, blink
-
- The border style is an integer as specified in the 4DOS help
- screen for DRAWBOX:
- 0 - borderless
- 1 - single line
- 2 - double line
- 3 - single on top and bottom, double on sides
- 4 - double on top and bottom, single on sides
-
-
-
-
- 3
-
- Following the title, the description entries must occur in sets
- of three as shown. The 'choice' should be as you want it to
- appear on the menu including some indication of the associated
- key. Two common forms are:
- 1. Thing
- (T)hing
-
- The 'action' is what will happen when the proper key is
- pressed. Although it must all fit on one line, it may consist of
- several commands put together with the 4DOS compound character.
- i.e. thing1 ^ thing2 ^ thing3 ^ ...
-
- 4MENU inserts the label :menulabel at the top of the batch file
- so that the menu can be recalled after each action. This is done
- by making the last command a goto menulabel as in
- thing1 ^ thingLast ^ goto menulabel
-
- Finally, the 'key' is simply the key the user must press to cause
- the desired action. It can be either a regular key or any of the
- extended key codes supported by KEYSTACK such as for F1 (@59).
-
- The menu will be placed in the center of the screen and will have
- margins of one space from each border. The title will be placed
- at the top of the menu followed by a separation line and then the
- choices.
-
- There is limited error checking of the format. In order for the
- number of choices, actions and keys to be equal (lines - 8) MOD 3
- must be zero. Unfortunately, the program will complain if the
- format file has a blank line at the bottom. It will also
- complain if the style field is not in the appropriate range, the
- character key field has more than four characters or the same key
- is used more than once. Finally only 19 entries are possible and
- an error will occur if there are more.
-
- Due to the requirement that the SCRPUT command contain text,
- blank lines in the menu are not allowed. However the single
- character '-' works well enough. Note, however, that a key must
- still be assigned. It is best in this case to simply assign the
- following command to the choice:
- beep ^ goto menulabel
-
-
- 3. EXAMPLES
- An example description file and its output are included in this
- package as sample.mnu and sample.btm. Note that these assume the
- command separation variable is the 4DOS default (^). It also
- demonstrates several of the techniques described above.
-
-
-
-
- 4
-
- 4. TECHNICAL INFORMATION
- 4MENU was written in QuickBASIC 4.00 and tested with DOS 3.30 and
- 4DOS 3.02a. It was compressed using LZEXE. Further space can be
- saved by recompiling it without the /O switch. This will require
- that BRUN40.EXE be accessible at run time. (Note that the /X and
- /E switch are required in either case.)
-
- Send any comments, complaints or suggestions to the above address
- or to the email address
- smithj@ohstpy.mps.ohio-state.edu
- Make sure the subject line contains the phrase - DISTWSMR
-
- The output from the VALIDATE utility is
-
- VALIDATE 0.3 Copyright 1988-89 by McAfee Associates. (408) 988-3832
- File Name: 4menu.exe
- Size: 37,531
- Date: 3-8-1991
-
- File Authentication:
- Check Method 1 - 8FFA
- Check Method 2 - 136F
-
-
- 5. REVISION HISTORY
- 1.0 - Original release
-
- 1.1 - Fixes a bug whereby the title was not checked when sizing
- the menu.
-
-
- 6. FUTURE HOPES
- 4MENU is a first approximation and updates will contain the
- following improvements:
- 1. Default settings for colors and style.
- 2. Allowance for blank lines in menus.
- 3. Control over menu placement.
- 4. Control over margins.
- 5. Less strict description file format.
- 6. More flexible color scheme.
- 7. Selection of choice with cursor keys.
-