home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / HILFEN / 4DOS / 4MENU / 4MENU11W.DOC < prev    next >
Text File  |  1993-12-01  |  7KB  |  184 lines

  1.  
  2.  
  3.                               4MENU DOCUMENTATION
  4.  
  5.      Copyright 1991 by Jeffery G. Smith
  6.      All rights reserved.
  7.  
  8.      The files which make up this program release may be distributed freely
  9.      only if they are unaltered and together in a copy of the original
  10.      compressed file 4MENU10W.ZIP
  11.           4MENU10W.DOC, 4MENU.BAS, 4MENU.EXE
  12.           SAMPLE.MNU, SAMPLE.BTM
  13.      No fees may be charged for distribution without consent of the author
  14.      except to cover the cost of materials.
  15.  
  16.      This program is provided as is and the author assumes no
  17.      responsibility for its performance.
  18.  
  19.      If you find this program useful please send whatever you feel it is
  20.      worth to
  21.           Jeffery G. Smith
  22.           DISTWSMR
  23.           174 West Eighteenth Avenue
  24.           Columbus, Ohio 43202
  25.  
  26.  
  27.  
  28.  
  29.                                                                           2
  30.  
  31.      1. PURPOSE
  32.           Although 4DOS has advanced and extensive provisions for making
  33.           attractive and user friendly menus in batch files with the
  34.           DRAWBOX, SCRPUT, SCREEN and INKEY functions, it can be more than
  35.           a little tedious to calculate the parameters to create menus
  36.           using these functions.  This program automates the process using
  37.           a description of the menu to produce a batch file with the proper
  38.           commands to implement it.
  39.  
  40.           Specifically the batch file does the following:
  41.  
  42.           1. Creates a menu using the DRAWBOX, SCRPUT and SCREEN
  43.              functions.
  44.           2. Gets a response using the INKEY function.
  45.           3. Performs an associated action.
  46.           4. Beeps if a incorrect key is pressed and redraws the menu.
  47.  
  48.  
  49.      2. USAGE
  50.           usage: 4menu [description-file]
  51.  
  52.           If no file is given on the command line, you will be prompted for
  53.           one.  In either case, if no extension is given '.mnu' will be
  54.           assumed.
  55.  
  56.           The format of the file is:
  57.           screen foreground color
  58.           screen background color
  59.           menu foreground color
  60.           menu background color
  61.           border foreground color
  62.           border background color
  63.           border style
  64.           title
  65.           choice1
  66.           action1
  67.           key1
  68.           ...
  69.  
  70.           The colors available are:
  71.                     Black, Blue, Green, Red, Magenta, Cyan, Yellow, White
  72.           The foreground versions may be preceded by the attributes:
  73.                     bright, blink
  74.  
  75.           The border style is an integer as specified in the 4DOS help
  76.           screen for DRAWBOX:
  77.                     0 - borderless
  78.                     1 - single line
  79.                     2 - double line
  80.                     3 - single on top and bottom, double on sides
  81.                     4 - double on top and bottom, single on sides
  82.  
  83.  
  84.  
  85.  
  86.                                                                           3
  87.  
  88.           Following the title, the description entries must occur in sets
  89.           of three as shown.  The 'choice' should be as you want it to
  90.           appear on the menu including some indication of the associated
  91.           key.  Two common forms are:
  92.                     1. Thing
  93.                     (T)hing
  94.  
  95.           The 'action' is what will happen when the proper key is
  96.           pressed.  Although it must all fit on one line, it may consist of
  97.           several commands put together with the 4DOS compound character.
  98.                     i.e. thing1 ^ thing2 ^ thing3 ^ ...
  99.  
  100.           4MENU inserts the label :menulabel at the top of the batch file
  101.           so that the menu can be recalled after each action.  This is done
  102.           by making the last command a goto menulabel as in
  103.                     thing1 ^ thingLast ^ goto menulabel
  104.  
  105.           Finally, the 'key' is simply the key the user must press to cause
  106.           the desired action.  It can be either a regular key or any of the
  107.           extended key codes supported by KEYSTACK such as for F1 (@59).
  108.  
  109.           The menu will be placed in the center of the screen and will have
  110.           margins of one space from each border.  The title will be placed
  111.           at the top of the menu followed by a separation line and then the
  112.           choices.
  113.  
  114.           There is limited error checking of the format.  In order for the
  115.           number of choices, actions and keys to be equal (lines - 8) MOD 3
  116.           must be zero.  Unfortunately, the program will complain if the
  117.           format file has a blank line at the bottom.  It will also
  118.           complain if the style field is not in the appropriate range, the
  119.           character key field has more than four characters or the same key
  120.           is used more than once.  Finally only 19 entries are possible and
  121.           an error will occur if there are more.
  122.  
  123.           Due to the requirement that the SCRPUT command contain text,
  124.           blank lines in the menu are not allowed.  However the single
  125.           character '-' works well enough.  Note, however, that a key must
  126.           still be assigned.  It is best in this case to simply assign the
  127.           following command to the choice:
  128.                     beep ^ goto menulabel
  129.  
  130.  
  131.      3. EXAMPLES
  132.           An example description file and its output are included in this
  133.           package as sample.mnu and sample.btm.  Note that these assume the
  134.           command separation variable is the 4DOS default (^).  It also
  135.           demonstrates several of the techniques described above.
  136.  
  137.  
  138.  
  139.  
  140.                                                                           4
  141.  
  142.      4. TECHNICAL INFORMATION
  143.           4MENU was written in QuickBASIC 4.00 and tested with DOS 3.30 and
  144.           4DOS 3.02a.  It was compressed using LZEXE.  Further space can be
  145.           saved by recompiling it without the /O switch.  This will require
  146.           that BRUN40.EXE be accessible at run time.  (Note that the /X and
  147.           /E switch are required in either case.)
  148.  
  149.           Send any comments, complaints or suggestions to the above address
  150.           or to the email address
  151.                     smithj@ohstpy.mps.ohio-state.edu
  152.           Make sure the subject line contains the phrase - DISTWSMR
  153.  
  154. The output from the VALIDATE utility is
  155.  
  156. VALIDATE 0.3 Copyright 1988-89 by McAfee Associates.  (408) 988-3832
  157.             File Name:  4menu.exe
  158.             Size:  37,531
  159.             Date:  3-8-1991
  160.  
  161. File Authentication:
  162.      Check Method 1 - 8FFA
  163.      Check Method 2 - 136F
  164.  
  165.  
  166.      5. REVISION HISTORY
  167.           1.0 - Original release
  168.  
  169.           1.1 - Fixes a bug whereby the title was not checked when sizing
  170.                 the menu.
  171.  
  172.  
  173.      6. FUTURE HOPES
  174.           4MENU is a first approximation and updates will contain the
  175.           following improvements:
  176.                     1. Default settings for colors and style.
  177.                     2. Allowance for blank lines in menus.
  178.                     3. Control over menu placement.
  179.                     4. Control over margins.
  180.                     5. Less strict description file format.
  181.                     6. More flexible color scheme.
  182.                     7. Selection of choice with cursor keys.
  183.  
  184.