home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 010 / batmnu24.zip / BATMNU24.DOC < prev    next >
Text File  |  1994-10-11  |  46KB  |  1,068 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.                  ┌────────────────────────────────────┐  
  17.                  │  ╔══════════════════════════════╗  │▒▒
  18.                  │  ║                              ║  │▒▒
  19.                  │  ║            BATMNU            ║  │▒▒
  20.                  │  ║    Batch File Menu System    ║  │▒▒
  21.                  │  ║         Version  2.4         ║  │▒▒
  22.                  │  ║                              ║  │▒▒
  23.                  │  ╚══════════════════════════════╝  │▒▒
  24.                  └────────────────────────────────────┘▒▒
  25.                    ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                              October 11, 1994
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                             TABLE OF CONTENTS
  64.  
  65.    1.0  INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
  66.         1.1 Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
  67.  
  68.    2.0  MENU FORMAT  . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
  69.         2.1  General Format Rules  . . . . . . . . . . . . . . . . . . . . 2
  70.         2.2  Window Options  . . . . . . . . . . . . . . . . . . . . . . . 2
  71.              F#, B#  Foreground/Background Color . . . . . . . . . . . . . 3
  72.              T#  Title Color . . . . . . . . . . . . . . . . . . . . . . . 3
  73.              O#  Option Color  . . . . . . . . . . . . . . . . . . . . . . 3
  74.              H#  Hotkey Color  . . . . . . . . . . . . . . . . . . . . . . 3
  75.              K#  Clear Screen  . . . . . . . . . . . . . . . . . . . . . . 3
  76.              K#string  Clear Screen with String  . . . . . . . . . . . . . 3
  77.              E#  Screen Border Color . . . . . . . . . . . . . . . . . . . 3
  78.              Bar-#/#  Highlight Bar Color  . . . . . . . . . . . . . . . . 3
  79.              Color Values  . . . . . . . . . . . . . . . . . . . . . . . . 4
  80.         2.3  Window Appearance . . . . . . . . . . . . . . . . . . . . . . 4
  81.              S#  Shadow  . . . . . . . . . . . . . . . . . . . . . . . . . 4
  82.              C  Center Options . . . . . . . . . . . . . . . . . . . . . . 4
  83.              W  Wide Menu  . . . . . . . . . . . . . . . . . . . . . . . . 4
  84.              L, N  Lettered, Numbered Options  . . . . . . . . . . . . . . 5
  85.              A, AN  Auto Hotkey, Auto Hotkey/No Case . . . . . . . . . . . 5
  86.              M#  Menu Border . . . . . . . . . . . . . . . . . . . . . . . 5
  87.              +  Join Lines . . . . . . . . . . . . . . . . . . . . . . . . 5
  88.              R#, C#  Row, Column . . . . . . . . . . . . . . . . . . . . . 5
  89.              No_Margin  No Wide Margin . . . . . . . . . . . . . . . . . . 5
  90.              Popup  Save/Restore Screen Contents . . . . . . . . . . . . . 6
  91.              No_Bar  No Highlight Bar  . . . . . . . . . . . . . . . . . . 6
  92.         2.4  Other Window Options  . . . . . . . . . . . . . . . . . . . . 6
  93.              X  No Mouse . . . . . . . . . . . . . . . . . . . . . . . . . 6
  94.              P#  Screen Saver Pause  . . . . . . . . . . . . . . . . . . . 6
  95.              V#[var]  Option Value Return  . . . . . . . . . . . . . . . . 6
  96.              ~  Escape . . . . . . . . . . . . . . . . . . . . . . . . . . 7
  97.              Auto_Help  Automatic Extended Help  . . . . . . . . . . . . . 7
  98.         2.5  Option Lines  . . . . . . . . . . . . . . . . . . . . . . . . 7
  99.         2.6  Option Help . . . . . . . . . . . . . . . . . . . . . . . . . 7
  100.         2.7  Headers and Footers . . . . . . . . . . . . . . . . . . . . . 9
  101.              F#, B#  Foreground/Background Color . . . . . . . . . . . . . 9
  102.              T#, D#  Time and Date . . . . . . . . . . . . . . . . . . . . 9
  103.              Popup  Save/Restore Header and Footer Line  . . . . . . . . . 10
  104.  
  105.    3.0  WHAT HAPPENS IN THE BATCH FILE?  . . . . . . . . . . . . . . . . . 10
  106.  
  107.    4.0  MENUS WITH PARAMETERS  . . . . . . . . . . . . . . . . . . . . . . 11
  108.  
  109.    5.0  MOUSE SUPPORT  . . . . . . . . . . . . . . . . . . . . . . . . . . 12
  110.  
  111.    6.0  SCREEN SAVER . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
  112.  
  113.    7.0  SHAREWARE INFORMATION  . . . . . . . . . . . . . . . . . . . . . . 12
  114.         7.1  New Security Version  . . . . . . . . . . . . . . . . . . . . 13
  115.         7.2  New Utility Available . . . . . . . . . . . . . . . . . . . . 13
  116.  
  117.         7.3  Bonus Program . . . . . . . . . . . . . . . . . . . . . . . . 14
  118.  
  119.    8.0  BATMNU History . . . . . . . . . . . . . . . . . . . . . . . . . . 14
  120.  
  121.    APPENDIX  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128. BATMNU v2.4
  129. ─────────────────────────────────────────────────────────────────────────
  130.  
  131. 1.0  INTRODUCTION
  132. ─────────────────────────────────────────────────────────────────────────
  133. This program is a menuing system for use with your batch files.  It is
  134. not intended to be a shell, although with some very ambitious batch file
  135. programming, it could be used as one. Even nested menus are possible. Its
  136. purpose is to provide sophisticated flow control and give batch files a
  137. professional appearance by creating a point-and-shoot menu with up to 26
  138. options per menu. The cursor keys and the HOME and END keys can then be
  139. used to make the selection. Each option can be selected by a 'hotkey'
  140. defined by your menu. A mouse is also supported if detected and there is
  141. a Screen Saver feature to protect your display.
  142.  
  143. BATMNU should run on any IBM PC compatible. Use of this program requires
  144. an understanding of batch file programming and DOS. Without that you will
  145. have difficulty extracting the full potential of BATMNU.
  146.  
  147. 1.1 Syntax
  148. ─────────────────────────────────────────────────────────────────────────
  149. The batch file created to utilize BATMNU needs a line in the following
  150. format:
  151.  
  152. BATMNU [d:][path]filename [label] [default]
  153.  
  154. The program defaults to a filename extension of "mnu" if none is
  155. provided. The filename can indicate a separate file or, if you prefer,
  156. the menu can be within the calling batch file. You will have to code the
  157. batch file so those lines are never executed, of course. (See the file
  158. NORTON.BAT for an example of a menu within a batch file.) If a separate
  159. file is used, it can be 'hidden' making it more secure from tampering. 
  160.  
  161. The optional label parameter can be used if you wish to put more than one
  162. menu within the file. Bracket your menu lines with ":label" and
  163. ":end_label". BATMNU will search your path for the file if it's not in
  164. the current directory. The label can be up to 15 characters long. The
  165. default is "Menu".
  166.  
  167. The default parameter on the command line is used if you want an option
  168. other than the first one to be highlighted when the menu starts. e.g.
  169. "BATMNU NORTON.BAT 3" will highlight the third option and place the mouse
  170. cursor, if used, next to it.
  171.  
  172. 2.0  MENU FORMAT
  173. ─────────────────────────────────────────────────────────────────────────
  174.      :menu       {keyword to mark where the program should start reading}
  175.      header,header text
  176.      h_format,fYEL,bred,t1,d1                 {header colors, time, date}
  177.      window,tRED,hWHI,...       {colors and window appearance definition}
  178.      title,title text
  179.      option,option text,[#]  {# indicates hotkey position in option text}
  180.  
  181.                                     1
  182.  
  183.  
  184.  
  185.  
  186.  
  187. Documentation
  188. ─────────────────────────────────────────────────────────────────────────
  189.  
  190.      help,help text                   {must follow option help refers to}
  191.      option,option text,[#][,[drive],[directory],pgm]   {optional format}
  192.      option...
  193.      . 
  194.      .
  195.      .
  196.      msg,message text                        {Appears below menu options}
  197.      footer,footer text
  198.      f_format,fYEL,bred,t1,d1                {footer colors, time, date}
  199.      :end_menu               {Program stops reading and closes the file}
  200.  
  201. 2.1  General Format Rules
  202. ─────────────────────────────────────────────────────────────────────────
  203. The definition can be organized in almost any order as long as it is
  204. placed between the ':menu' and ':end_menu' keywords (or other label if
  205. provided on the command line). The window line should appear before the
  206. options if you use the 'l', 'n' or 'a' parameter. Maximum title and
  207. message length is 54 characters. Headers and footers can be 70 characters
  208. long if the time and/or date are not used. If you leave the title out,
  209. your menu will contain only your defined options. Header and footer are
  210. optional. Maximum option length is 50 characters for single column menus
  211. and 25 characters for double column.(See "no_margin" description on page
  212. 5 for longer title, message and option lines.) Maximum help length is 70
  213. characters.
  214.  
  215. All parameters on the window, h_format and f_format lines are separated
  216. by a comma. Spaces are ignored. The keywords can be indented for clarity,
  217. if desired, using spaces or TABs.
  218.  
  219. Environment variables can be used within the header, footer, options,
  220. help lines, title or message. The variables are indicated by surrounding
  221. the name with the percent (%) sign, just as you would on a batch file
  222. command line. The variable's value is inserted when the menu is
  223. displayed. If the variable is not found, the variable name is used as it
  224. appears in the menu with % signs.
  225.  
  226. 2.2  Window Options
  227. ─────────────────────────────────────────────────────────────────────────
  228. The "window" line in your menu will define the colors, appearance and
  229. actions of your menu. Each switch or keyword should be separated by a
  230. comma. The color options are:
  231.  
  232.      f# - foreground color of window (0-15)
  233.      b# - background color of window, (0-7)
  234.      t# - title color (0-15)
  235.      o# - option color (0-15)
  236.      h# - hotkey color (0-15)
  237.      k# - screen color (clears screen), foreground(0-15), background(0-7)
  238.      e# - screen border color (0-15)
  239.  
  240.                                     2
  241.  
  242.  
  243.  
  244.  
  245.  
  246. BATMNU v2.4
  247. ─────────────────────────────────────────────────────────────────────────
  248.  
  249. Bar-#/# - highlight bar foreground / background color
  250.  
  251. F#, B#  Foreground/Background Color
  252.      These options define the color of the window background and the
  253.      foreground color of the border. Default: FYEL, Bblu
  254.  
  255. T#  Title Color
  256.      The title and message text will appear in this color. Default: TWHI
  257.  
  258. O#  Option Color
  259.      Menu options will have this color. Default: OCYA
  260.  
  261.  
  262. H#  Hotkey Color
  263.      The hotkey for each option will have this color. A special color
  264.      option for this switch is INV which makes the hotkey invisible, i.e.
  265.      the same color as the option text. The option can still be selected
  266.      by the hotkey, however. Default: HRED
  267.  
  268. K#  Clear Screen
  269.      The 'k' option fills double duty setting the foreground and
  270.      background color for the screen. The first k parameter will set the
  271.      background, the second the foreground (Foreground default is "whi"
  272.      if not specified).  The foreground color is used with the fill
  273.      character. The fill character can appear after the color of either
  274.      to give the screen background more interest than a flat color. Use
  275.      of the drop shadow is more dramatic too.
  276.  
  277. K#string  Clear Screen with String
  278.      If you prefer, a string could be used to fill the screen background.
  279.      Either words or special characters could be used. Put the string
  280.      after the color as above. If you want to add spaces, use the
  281.      underscore (_) character. It will be treated as a space when
  282.      displayed. (e.g. kred_Main_Menu)
  283.  
  284. E#  Screen Border Color
  285.      The 'e' option sets the screen border color which is outside the
  286.      normal text area. An 'e' used alone will reset the border to its
  287.      normal black.
  288.  
  289. Bar-#/#  Highlight Bar Color
  290.      By default, BATMNU uses a mask to define the colors for the
  291.      highlight bar. They are chosen in such a way that the bar and the
  292.      text will always be visible. This switch allows you to define the
  293.      color yourself. Using "bar-" alone will give you the default Bright
  294.      White on Black bar. You can define either or both colors. To get
  295.      Bright Red on Black use, "bar-RED". For Bright White on Blue, "bar-
  296.      /blu". "bar-BLU/whi" will give you bright Blue on White. To
  297.      eliminate the highlight bar, see "No_Bar" on page 6.
  298.  
  299.                                     3
  300.  
  301.  
  302.  
  303.  
  304.  
  305. Documentation
  306. ─────────────────────────────────────────────────────────────────────────
  307.  
  308. Color options should be followed by one of the color values shown in the
  309. chart below.
  310.  
  311.                                Color Values
  312.              0 or bla = Black      8 or BLA = Grey          
  313.              1 or blu = Blue       9 or BLU = Bright Blue   
  314.              2 or gre = Green     10 or GRE = Bright Green  
  315.              3 or cya = Cyan      11 or CYA = Bright Cyan   
  316.              4 or red = Red       12 or RED = Bright Red    
  317.              5 or mag = Magenta   13 or MAG = Bright Magenta
  318.              6 or yel = Brown     14 or YEL = Yellow        
  319.              7 or whi = White     15 or WHI = Bright White  
  320.  
  321. Default colors are provided (fYEL, bblu, tWHI, oCYA, hRED) and the
  322. options will be left-justified. The menu will be in single column format
  323. unless it exceeds 13 options. It will have a double line frame (m2).
  324. Default colors for headers/footers are fWHI, bred.
  325.  
  326. 2.3  Window Appearance
  327. ─────────────────────────────────────────────────────────────────────────
  328. The window appearance options are:
  329.  
  330.        s# - shadow on, 1-4 to position shadow relative to menu
  331.         c - center each option individually
  332.         w - display in wide, 2 column format, default for > 13 options
  333.         l - default to letter selection of options
  334.         n - default to number selection of options, maximum of 10 options
  335.      a[n] - automatic selection of hotkeys. [optional no case favoring]
  336.        m# - menu frame type, 0- none, 1- ┌─, 2- ╔═, 3- ╒═, 4- ╓─,  5- █▀
  337.         + - join title and message divider lines to border
  338.        r# - top row for menu window
  339.        c# - left column for menu window
  340. No_Margin - display menu without wide margin around the frame
  341.     Popup - save entire screen and restore when menu closes
  342.    No_Bar - no highlight bar
  343.  
  344. S#  Shadow
  345.      The shadow position is set with the 's' option. 1 is below and to
  346.      the right. 2 is below and the to left. 3 is above and to the right.
  347.      4 is above and to the left. The 's' option alone defaults to 1.
  348.  
  349. C  Center Options
  350.      Menu options are normally left justified. If you want your options
  351.      centered in the menu, use the 'c' switch.
  352.  
  353. W  Wide Menu
  354.      If you want a 2 column menu, the 'w' switch will force BATMNU into
  355.      this mode. As a default, menus with more than 13 options are always
  356.      displayed this way.
  357.  
  358.                                     4
  359.  
  360.  
  361.  
  362.  
  363.  
  364. BATMNU v2.4
  365. ─────────────────────────────────────────────────────────────────────────
  366.  
  367. L, N  Lettered, Numbered Options
  368.      The 'l' option will place a letter in front of every option to be
  369.      used as the hotkey. This can be useful when you have a large number
  370.      of options or if you just prefer it that way. The 'n' option is for
  371.      those who prefer numbered menus. Naturally, only 10 options are
  372.      possible with numbers as hotkeys. The 'c' option is overridden if
  373.      you use 'l' or 'n'. With these options, your maximum option length
  374.      is reduced by 3 characters and the hotkey position will be set to 1.
  375.      If you follow the 'l' or 'n' with another character such as a dash,
  376.      period or parenthesis, this will be used as a separator. (e.g. 'l-'
  377.      will produce 'A-', 'B-', etc for the menu.)
  378.  
  379. A, AN  Auto Hotkey, Auto Hotkey/No Case
  380.      It is not necessary to specify the hotkeys for your options. If you
  381.      leave this information out, BATMNU defaults to the first character.
  382.      By using the 'a' switch, BATMNU will make sure you don't end up with
  383.      duplicates. It makes a one-pass search to find unique letters for
  384.      all the options. You can override the selection by indicating the
  385.      hotkey on the option line. The search favors uppercase letters
  386.      unless the no-case modifier is used, 'an'.
  387.  
  388. M#  Menu Border
  389.      The menu border is controlled with the 'm' switch. The default value
  390.      is 2 which will use a double line border. It is also possible to
  391.      specify a custom character to outline the menu. Follow the 'm' with
  392.      any non-alpha character you wish. If you wish to eliminate the
  393.      border all together, use 'm0'. The resulting menu will be only
  394.      slightly larger than the text.
  395.  
  396. +  Join Lines
  397.      The title and message text is separated from the menu options with a
  398.      single horizontal line. By default it does not touch the border.
  399.      With the '+' option, it can be joined to the border.
  400.  
  401. R#, C#  Row, Column
  402.      To place the menu at a position other than centered on the screen,
  403.      the 'r' and 'c' switches will define the position of the upper left
  404.      hand corner. BATMNU will make adjustments to ensure the menu and
  405.      shadow, if used, will remain within the screen boundaries. BATMNU
  406.      will not confuse 'c' (centered) with 'c#', column #.
  407.  
  408. No_Margin  No Wide Margin
  409.      If you prefer that the menu does not have the large margin around
  410.      the menu, use the "no_margin" keyword to eliminate it. This will
  411.      increase the Title and Option line maximum length to 60 and 56
  412.      respectively. It the menu is in 2 column format, the max option
  413.      length is 28.
  414.  
  415.  
  416.  
  417.                                     5
  418.  
  419.  
  420.  
  421.  
  422.  
  423. Documentation
  424. ─────────────────────────────────────────────────────────────────────────
  425.  
  426. Popup  Save/Restore Screen Contents
  427.      You have the option to save the entire screen before BATMNU displays
  428.      the menu, and restore the saved contents after the menu closes.
  429.      Include the keyword "popup" on the "window" line to make this
  430.      happen. Cursor position is saved as well.
  431.  
  432. No_Bar  No Highlight Bar
  433.      If you want the type of menu that just uses hotkey option selection,
  434.      put this keyword on the "window" line. It should be noted that this
  435.      option cannot be combined with 'HINV' since the user would have no
  436.      way of knowing how to pick an option. Whichever option appears last
  437.      on the line will be used. Also note that option help is of no use to
  438.      a menu with no highlight bar (See "2.6 Option Help", p. 7).
  439.  
  440. 2.4  Other Window Options
  441. ─────────────────────────────────────────────────────────────────────────
  442. There are five other options for the window line:
  443.  
  444.         x - disables the mouse. No search is performed.
  445.        p# - Screen Saver Pause
  446.   v#[var] - Option Return Value
  447.         ~ - Allows use of the Escape key to exit menu, returns EL 0
  448. auto_help - Extended help window displayed as option is highlighted.
  449.  
  450. X  No Mouse
  451.      Use 'x' if you do not want to use the mouse. The mouse check is
  452.      skipped when the program starts and there is no delay in activating
  453.      the menu. This option has no effect on systems without a mouse.
  454.  
  455. P#  Screen Saver Pause
  456.      'p' controls the pause time before the Screen Saver activates. The
  457.      default is 5 minutes. The Screen Saver can be disabled with 'p0' and
  458.      the maximum setting is 30 minutes (p30).
  459.  
  460. V#[var]  Option Value Return
  461.      Information about the option chosen can be returned through the
  462.      environment by using the 'v' option. It extracts a portion or all of
  463.      the option's text and can be used for a number of things. Its format
  464.      is "v#var" where # controls the number of characters to return (1-
  465.      60) and var is the variable name to use. If the variable name is not
  466.      specified, BATMNU will use "VAL". In retrieving the text, if # is
  467.      larger than the option's length, the entire option text is returned.
  468.      If you use the letter or number option, the label is skipped so that
  469.      just the option's text is placed in the environment. See the example
  470.      batch file, NORTONV.BAT, to see how this feature can be used to
  471.      eliminate "if errorlevel" statements and simplify the batch file.
  472.      NOTE: DOS 3.3 or higher is needed to use this feature.
  473.  
  474.  
  475.  
  476.                                     6
  477.  
  478.  
  479.  
  480.  
  481.  
  482. BATMNU v2.4
  483. ─────────────────────────────────────────────────────────────────────────
  484.  
  485. ~  Escape
  486.      Normally, ESCape is not a valid key for a menu. If you wish ESCape
  487.      to be active, place  a '~' on the window line. Errorlevel 0 will be
  488.      returned. If the 'v' option is used, the environment variable will
  489.      be set to "ESC".
  490.  
  491. Auto_Help  Automatic Extended Help
  492.      Placing this keyword on the window line will cause the Extended
  493.      Option Help window for an option to be displayed when the option is
  494.      highlighted. See section 2.6 Option Help for more details (p. 9).
  495.  
  496. 2.5  Option Lines
  497. ─────────────────────────────────────────────────────────────────────────
  498. As stated above, the format for the option line is:
  499.  
  500.      option,Option Text,hotkey[,drive letter,directory,program params]
  501.  
  502. Hotkey position starts at 1 and will default to that position if omitted
  503. or the number is longer than the text. Alternately, the hotkey can be
  504. defined with a character. BATMNU will first search the option text for an
  505. uppercase letter that matches. If there is no uppercase match, the
  506. program will do a lowercase search for the first character that matches.
  507. (e.g. "Disk Info,i" will highlight the I of "Info". "Disk Filer,i" will
  508. highlight the i in "Disk".) Use a number if you want a specific character
  509. as your hotkey. 
  510.  
  511. If a hotkey character is duplicated, the menu will return the value
  512. associated with the first option with that hotkey if the hotkey is
  513. pressed. If the highlight bar is used to select an option with a
  514. duplicate hotkey value, the highlighted option value will be returned.
  515.  
  516. You can let BATMNU select the hotkeys, if you wish, with the 'a' window
  517. parameter. The choices can be overridden by the option line selection.
  518. The menu will default to letter choices if it runs out of characters to
  519. pick from. This procedure will also favor uppercase characters before
  520. lowercase. To override this, use 'an' (auto hotkey, no case).
  521.  
  522. If the program cannot find any options in the file, a Menu Format Error
  523. message will be displayed.
  524.  
  525. Refer to the section, Menus With Parameters (page 11), to see a
  526. description of the drive, directory and program options.
  527.  
  528. 2.6  Option Help
  529. ─────────────────────────────────────────────────────────────────────────
  530. The Help line specifies text which will appear in the footer (See below.)
  531. when the option is highlighted. It can be up to 70 characters long and
  532. can appear with the time and date. This will restrict the help line
  533. length some, depending on the time/date format used. The help must follow
  534.  
  535.                                     7
  536.  
  537.  
  538.  
  539.  
  540.  
  541. Documentation
  542. ─────────────────────────────────────────────────────────────────────────
  543.  
  544. the option it refers to creating option/help pairs in the menu. e.g.
  545. "option,Norton Commander" could be followed by "help,File Utility".
  546.  
  547. If you want more extended help for an option, use a label (up to 15
  548. characters long) instead of just text. This type of line would have the
  549. form "help,:NC". The colon marks 'NC' as a label. When the option is
  550. highlighted, "Press F1 for Option Help" will appear in the footer. To
  551. define your own prompt, follow the label with a comma and your prompt
  552. text. For example, "help,:NC_Hlp,File Utility - Press F1 for more"
  553.  
  554. When F1 is pressed, BATMNU will read a section of the same file
  555. containing the menu that starts with ":NC_Hlp" and ends with
  556. ":End_NC_Hlp". Between these two labels is information defining a help
  557. window. It is defined similarly to the menu. There can be a "window" line
  558. with any of the following switches: F# (window foreground color), B#
  559. (window background color), T# (Title color), O# (Help Text color), M#
  560. (window frame type), S# (shadow type), C (center help text), R# (row for
  561. upper left corner), C# (column for upper left corner) and + (join title
  562. separator to window frame). 
  563.  
  564. All of these switches follow the same rules as described above in the
  565. "2.2 Window Options" and "2.3  Window Appearance" Sections. As a default,
  566. the help window will inherit the menu's values so you could skip the
  567. "window" line entirely. C (center) and + (join) differ slightly in that
  568. they will reverse the value inherited from the menu. If the menu's
  569. options are centered and C is used on the help's "window" line, the help
  570. text will NOT be centered. Likewise, if + appears in both the menu and
  571. help, the menu's separators will be joined and the help separator will
  572. not.
  573.  
  574. There is no "Title" line for help. The option text is used as the help
  575. window's title.
  576.  
  577. As in the menu, the "window" line and help text can be indented for
  578. better readability. The leading spaces will be ignored. If you want any
  579. line of text appearing in the window to be indented, precede the line
  580. with an underscore (_) for each space you want. This is interpreted by
  581. Batmnu as a "hard space" and will not be disregarded. Only hard spaces
  582. preceding the text will be converted. The following is an example of the
  583. extended help window definition:
  584.  
  585. :NC_Hlp
  586.    window, fBLU, bwhi, tred, oblu, c
  587.       This program provides a great many file
  588.       and directory manipulation routines.
  589. :End_NC_Hlp
  590.  
  591. This will result in a window with a white background, bright blue border,
  592. red title, and centered blue help text (if the menu's options are NOT
  593.  
  594.                                     8
  595.  
  596.  
  597.  
  598.  
  599.  
  600. BATMNU v2.4
  601. ─────────────────────────────────────────────────────────────────────────
  602.  
  603. centered). It will have a shadow identical to the menu's, assuming the
  604. menu had one.
  605.  
  606. The extended help window can be configured to appear automatically as the
  607. option is highlighted. Just add the key "Auto_Help" to the menu's window
  608. line. For appearance's sake, it is suggested that the menu and help
  609. windows be positioned (using R# and C#) so they don't overlap or at least
  610. so the highlighted menu option is still visible. It should be noted that
  611. the help is read from the menu file each time the option is highlighted
  612. as a way to conserve memory. Some delay may be noticed on slower systems.
  613.  
  614. IMPORTANT NOTE: Help, simple or extended, is not displayed when a menu
  615. has no highlight bar. (See no_bar, p. 6)
  616.  
  617. 2.7  Headers and Footers
  618. ─────────────────────────────────────────────────────────────────────────
  619. Header and Footer format lines (h_format, f_format) have the following
  620. options:
  621.  
  622.      f# - Text Foreground color (0-15)
  623.      b# - Text Background color (0-7)
  624.      t# - Display time of day (0-4)
  625.      d# - display today's date (0-5)
  626.   Popup - show text while menu is displayed only
  627.  
  628. The header and footer items define a line of text to appear at the top
  629. and bottom of the screen. The entire row will be colored with the
  630. background color. 
  631.  
  632. F#, B#  Foreground/Background Color
  633.      Colors are defined on the h_format and f_format lines using the f#
  634.      (foreground) and b# (background) parameters as shown above. Refer to
  635.      Window Options on page 2 for more information on colors.
  636.  
  637. T#, D#  Time and Date
  638.      The time and date can appear in the header and / or footer. On the
  639.      format line(s) include a 't' for time and 'd' for date followed by a
  640.      number indicating the format to use. They are as follows:
  641.  
  642.                TIME                     DATE
  643.           0 -  HH:MM:SS (default)  0 -  MM/DD/YY (default)
  644.           1 -  HH:MM:SS am         1 -  MM/DD/YYYY
  645.           2 -  HH:MM am            2 -  DDD MMM DD, YYYY
  646.           3 -  HH.MM.SS            3 -  DD/MM/YY
  647.           4 -  HH.MM               4 -  DD/MM/YYYY
  648.                                    5 -  DDD DD MMM YYYY
  649.  
  650.      The date will appear to the left of the header or footer and the
  651.      time will appear to the right. If the header/footer is too long, the
  652.  
  653.                                     9
  654.  
  655.  
  656.  
  657.  
  658.  
  659. Documentation
  660. ─────────────────────────────────────────────────────────────────────────
  661.  
  662.      time and date information could overwrite it. A footer can be
  663.      combined with help (See above.) with the help text given precedence.
  664.      If an option has no help line, the footer text is displayed.
  665.  
  666. Popup  Save/Restore Header and Footer Line
  667.      Another option for the f_format and h_format lines is the keyword
  668.      "popup". Normally, the header and footer lines remain after the menu
  669.      selection is made. If you want either or both of these lines to
  670.      disappear with the menu, include the keyword "popup" on the
  671.      appropriate format line. Their appearance will be the same when the
  672.      menu is displayed, however, they will disappear, restoring the
  673.      original lines, or the menu background if k# was used (p. 3), when
  674.      the menu closes.
  675.  
  676. 3.0  WHAT HAPPENS IN THE BATCH FILE?
  677. ─────────────────────────────────────────────────────────────────────────
  678. If you execute the sample batch file, NORTON.BAT, you will see a menu
  679. displaying several choices. If you choose one of the options, you will
  680. probably see a lot of DOS error messages as the chance of your computer
  681. being set up the same way is negligible. When you view the batch file,
  682. you can get a good idea how BATMNU operates.
  683.  
  684. The menu is near the beginning of the batch file mainly for speed. You
  685. will notice a "GOTO START" statement which causes the batch to branch
  686. around the menu. After the ":START" label is the command line that calls
  687. BATMNU and tells it what file the menu is in. If this file is not in your
  688. PATH or in the current directory when started, you would need to specify
  689. the full path name. e.g. BATMNU D:\UTIL\NORTON.BAT
  690.  
  691. DOS ERRORLEVEL is set on exit from BATMNU with EL 1 corresponding to the
  692. first option, etc. A series of "if errorlevel x goto ..." statements
  693. after the line calling BATMNU will allow the batch file to determine
  694. which option was selected and branch to the appropriate label. EL 127 is
  695. set whenever the program encounters an error (file not found or parameter
  696. error) so you should plan your batch file accordingly. If the Escape key
  697. option is used, this will always return an EL 0. Be sure to order your
  698. errorlevel statements from largest to smallest since "if errorlevel 3"
  699. will be true for EL=3 or greater. See your DOS manual for more
  700. information.
  701.  
  702. Executing BATMNU with no parameter will display a help screen and example
  703. menu if the file BATMNU.HLP, included in the original archive file, can
  704. be found (See the Appendix for more info on this file). If you type the
  705. command "BATMNU NORTON.BAT" from the DOS prompt, the menu will be
  706. displayed as before but nothing will happen when you make a choice. You
  707. need to run the batch file itself to get anything to start. Several
  708. example files are contained in this archive, including one showing a
  709. separate menu file, another a menu within a batch file, and a third
  710. detailing a menu with parameter passing.
  711.  
  712.                                     10
  713.  
  714.  
  715.  
  716.  
  717.  
  718. BATMNU v2.4
  719. ─────────────────────────────────────────────────────────────────────────
  720.  
  721. 4.0  MENUS WITH PARAMETERS
  722. ─────────────────────────────────────────────────────────────────────────
  723. Optionally, a program can be started directly from BATMNU. This will
  724. result in shorter batch files as minimal ERRORLEVEL checking is
  725. necessary. You will also find the programs will start faster since there
  726. is no batch file processing. The option line contains additional
  727. information relating to the drive, directory and program name is this
  728. form:
  729.  
  730.                     option,Word Perfect,w,c:,\wp51,wp
  731.  
  732. In this example, BATMNU will change the drive and directory and start WP
  733. when this option is selected. When WP is finished, you are returned
  734. directly to your batch file. BATMNU sets an environment variable, ERRLEV,
  735. to identify the program run. You may wish to do further processing based
  736. on the program run or you can check for an ERRORLEVEL code returned from
  737. that program. The ERRLEV variable will equal the number of the option
  738. picked. If WP was the third option, ERRLEV=3 would be in the environment.
  739. You could then run an automatic backup procedure for WP with the line "if
  740. %ERRLEV%!==3! goto wpbackup". 
  741.  
  742. Additional parameters can be passed to your program. Simply include them
  743. after the program name as you normally would.
  744.  
  745.      option,Paradox - Phones,11,e:,\paradox\phones,paradox3 phone.scr
  746.  
  747. This line would start Paradox which would then run the script phone.scr.
  748. It is recommended that your batch file clear the ERRLEV variable at the
  749. beginning and end to preserve space and prevent your batch file from
  750. acting on old information in the environment. The statement "SET ERRLEV="
  751. will do this.
  752.  
  753. If there are no parameters on a line, you can use BATMNU the same way as
  754. earlier versions and the ERRLEV variable will not be set. If you want to
  755. leave out the drive and/or directory parameters, leave a comma to mark
  756. it. BATMNU will assume the program can be found in your PATH. If you
  757. don't use any parameters for an option, the placeholders are not
  758. necessary. See the files NORTONP.BAT and NORTON.BAT in this archive for a
  759. comparison.
  760.  
  761. If you want the highlight bar to be on the option you just selected after
  762. returning, the ERRLEV variable can be used on the command line to set the
  763. default option. The command:
  764.  
  765.                        BATMNU NORTONP.BAT %ERRLEV%
  766.  
  767. will do this. Refer to the example file NORTONP.BAT to see how this is
  768. set up.
  769.  
  770.  
  771.                                     11
  772.  
  773.  
  774.  
  775.  
  776.  
  777. Documentation
  778. ─────────────────────────────────────────────────────────────────────────
  779.  
  780. IMPORTANT NOTE: DOS 3.3 or higher is required if you want to use
  781. parameters on the option lines. This is necessary so that BATMNU can use
  782. the environment to relay information back to the batch file. BATMNU will
  783. display an error message and return an EL 127 if you are not using the
  784. proper DOS version.
  785.  
  786. 5.0  MOUSE SUPPORT
  787. ─────────────────────────────────────────────────────────────────────────
  788. When BATMNU is run, it checks for a mouse unless the 'x' parameter is
  789. found on the "window" line. This switch will cause BATMNU to skip the
  790. check for, and not use, the mouse. Once the mouse is detected, the mouse
  791. cursor will be set next to the first option. The delay you will observe
  792. after the menu is displayed and before the highlight bar appears is the
  793. mouse initializing and is normal.
  794.  
  795. Options can be selected with the mouse by moving the cursor to the option
  796. line and clicking the left button. If the option is currently
  797. highlighted, BATMNU acts as if the hotkey was pressed. If not, only the
  798. highlight bar is moved. A second click will then select that option.
  799.  
  800. The right mouse button acts like the ESCape key if the ~ option is used.
  801.  
  802. 6.0  SCREEN SAVER
  803. ─────────────────────────────────────────────────────────────────────────
  804. If you use BATMNU for a shell, you will appreciate this feature. As a
  805. default, if the program does not see any key presses or mouse clicks in a
  806. 5 minute period, the screen will blank to protect your display. Only the
  807. cursor will show in the upper left hand corner. Press any key or mouse
  808. button to restore the screen.
  809.  
  810. The pause time before blanking is set on the Window line with the 'p'
  811. parameter. 'p0' will disable this feature and the maximum pause before
  812. blanking is 30 minutes.
  813.  
  814. 7.0  SHAREWARE INFORMATION
  815. ─────────────────────────────────────────────────────────────────────────
  816. This program is provided as "shareware". You are allowed to use it, free
  817. of charge, for a reasonable amount of time. If you find BATMNU to be
  818. useful, and continue to use it, a registration fee of $15 plus $2.50
  819. postage and handling is required. A form is supplied with the archive
  820. file to register with (BATMNU24.REG). Paying this fee will encourage me
  821. to make improvements and/or correct problems for future versions.
  822. Registered users will receive notification of future releases and
  823. information on how the new version can be obtained. It will also give
  824. their ideas for improvements more value. 
  825.  
  826. Site licenses for BATMNU can be negotiated. Registered 1.X users can
  827. upgrade to 2.4 for $5 plus $2.50 for postage and handling. Feel free to
  828. give it to friends or upload the original archive file to other BBS's
  829.  
  830.                                     12
  831.  
  832.  
  833.  
  834.  
  835.  
  836. BATMNU v2.4
  837. ─────────────────────────────────────────────────────────────────────────
  838.  
  839. provided that no fee is charged for distribution and it is not modified
  840. in any way. Note to BBS Sysops: Please post this archive file as is, with
  841. all files included, and without changing the filename.
  842.  
  843. 7.1  New Security Version
  844. ─────────────────────────────────────────────────────────────────────────
  845. If you have trouble with people messing with your menu files, BATMNU is
  846. now available in a version which will read specially encrypted files. The
  847. encryption scheme will not fool the CIA, but it should keep curious
  848. people from playing with your menu files.
  849.  
  850. This new version, called BATMNU-E, has all of the features of the regular
  851. program and is completely compatible with it. It will read straight text
  852. files as well as the encrypted ones. The program which does the
  853. encrypting (and decrypting for editing) is included with BATMNU-E and is
  854. very simple to use.
  855.  
  856. If you want to receive BATMNU-E and the companion encrypting program, the
  857. cost is $15. Use the form provided to register either or both.
  858.  
  859. 7.2  New Utility Available
  860. ─────────────────────────────────────────────────────────────────────────
  861. WHY DO USERS LIKE A MENU?
  862.  
  863. Because it makes their life easier. Now there is something to make the
  864. menu designer's life easier! Now creation of the menu is taken out of
  865. your hands and onto the screen!
  866.  
  867. The BatMnu Menu Utility makes creating menus fast and painless. It gives
  868. instant feedback on what your new menus will look like. Debugging the
  869. most  sophisticated menu is now a chore of the past. Seasoned BATMNU
  870. users quickly find they wouldn't be without this utility.
  871.  
  872. Now updated with the features of Batmnu v2.4, it's available to all 
  873. registered BATMNU users. Why do you need this? LOOK!
  874.  
  875.     - See your menu as you are creating it. Instant feedback on changes
  876.       and additions. The menu has the same look and feel it will have
  877.       with BATMNU.
  878.     - No need to remember which switch does what.
  879.     - Menus are created just by filling in forms, answering a few Yes/No
  880.       questions or selecting values from a list.
  881.     - Automatic formatting of the menu file.
  882.     - Menus can be edited even if they are inside batch files.
  883.     - Up to 16 menus from the same file can be edited at one time.
  884.     - Rearranging options is as easy as highlighting the option and
  885.       pressing a key. 
  886.  
  887.  
  888.  
  889.                                     13
  890.  
  891.  
  892.  
  893.  
  894.  
  895. Documentation
  896. ─────────────────────────────────────────────────────────────────────────
  897.  
  898. I know you will want the easiest way to create and edit menus for BATMNU.
  899. The BatMnu Menu Utility will make menu maintenance as easy as filling in
  900. a form. Use the registration form (BATMNU24.REG) to order BMU with your
  901. registered version of BATMNU. It's just $10 if you order with BATMNU. If
  902. you decide to order later you will have to pay an additional $2.50 for
  903. postage and handling. Get your copy today!
  904.  
  905. 7.3  Bonus Program!
  906. ─────────────────────────────────────────────────────────────────────────
  907. Upon receipt of the registration fee, a disk will be sent with the
  908. current version plus the program SW-DIR.EXE. This program provides a
  909. scrolling file directory which can be used to choose a file and pass that
  910. filename to an application or use it in your batch file. Appearance
  911. options are similar to BATMNU. The program includes a QuickSearch feature
  912. which can quickly locate a file by name. DOS 3.3 or higher is required to
  913. use this program.
  914.  
  915. Ver. 2.4    October 11, 1994
  916.  
  917. Warren Small                       CIS  71076,407
  918. 35 Benjamin Street                 AOL  WKSmall
  919. Manchester, NH  03109-4319         Internet  wksmall@aol.com
  920.                                    Prodigy  RSJW31A
  921.  
  922. 8.0  BATMNU History
  923. ─────────────────────────────────────────────────────────────────────────
  924. 1.1  2/02/90  First general release.
  925.  
  926. 1.2  3/15/90  Options increased to 26. Added automatic hotkeys (A, p. 5)
  927.      and hotkey choice by letter (p. 7).
  928.  
  929. 1.3  4/22/91  Added numbered options (N, p. 5), menu frame choices (M#,
  930.      p. 4), invisible hotkeys (INV, p. 3).
  931.  
  932. 2.0  9/30/91  New option line format to start programs directly (p. 11).
  933.      Added mouse support (p. 12), screen border color control (E#, p. 3),
  934.      screen foreground color control (K#, p. 3), header and footer option
  935.      (p. 9), shadow position control (S#, p. 4), letter and number
  936.      separator (L, N, p. 5).
  937.  
  938. 2.0a 1/31/92  Maintenance release fixing several bugs. Parameters now
  939.      passed properly to programs started by BATMNU. Border color set
  940.      properly. Default colors provided for header and footer. Header and
  941.      footer documentation provided.
  942.  
  943. 2.1  6/30/92  Added time/date options to header and footer (T#, D#, p.
  944.      9). Header and footer string length increased to 70 (p. 9). Default
  945.      menu choice can be specified on command line (p. 1). Corrected
  946.      action of menu with duplicate hotkeys (p. 7). Hotkey selection by
  947.  
  948.                                     14
  949.  
  950.  
  951.  
  952.  
  953.  
  954. BATMNU v2.4
  955. ─────────────────────────────────────────────────────────────────────────
  956.  
  957.      letter favors uppercase match in option text (p. 5). Option string
  958.      length increased to 50 for single column menus. Help line option
  959.      added (p. 7). Background string fill added (K#string, p. 3). 
  960.  
  961. 2.1a 9/22/92  Environment variables can be used in title, header, footer,
  962.      options and help (p. 2). ESC now clears help line (p. 7).
  963.  
  964. 2.2  1/11/93  Right mouse button used as ESC (p. 12). Screen Saver added
  965.      (P#, p. 12). Help now in external file (p. 16).
  966.  
  967. 2.3  10/29/93  Added row/col positioning for menu (R#, C#, p. 5), option
  968.      to remove wide margin around menu frame which increases title and
  969.      option maximum length (p. 5), popup style header and footer (popup,
  970.      p. 10), popup mode for the entire screen (popup, p. 6), and option
  971.      value return through environment (V#[var], p. 6). Default 2 column
  972.      menu now occurs at 14 instead of 12. Menu errors now return EL 127
  973.      instead of EL 0. Encryption version now available (p. 13). BatMnu
  974.      Menu Utility now available (p. 13).
  975.  
  976. 2.3a 2/15/94  Added message line to bottom of menu (msg, p. 2), custom
  977.      border and borderless options (m, p. 5), and option to join
  978.      title/msg separators to border (+, p. 5).
  979.  
  980. 2.4  9/30/94  Added extended option help (p. 8), highlight bar color
  981.      (Bar-, p. 3), and no highlight bar (no_bar, p. 6) Mouse cursor now
  982.      placed next to default option (p. 1). New help file format matching
  983.      Extended Option Help (See Appendix).
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.                                     15
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014. Documentation
  1015. ─────────────────────────────────────────────────────────────────────────
  1016.  
  1017. APPENDIX
  1018. ─────────────────────────────────────────────────────────────────────────
  1019. BATMNU 2.2 and higher use an external file for help information. The
  1020. advantage to this is that it makes the program file smaller and it also
  1021. allows a certain amount of customizing by the end user. The following is
  1022. a guide to the structure of the help file, BATMNU.HLP.
  1023.  
  1024. Beginning with Batmnu v2.4, the help file has been modified to follow 
  1025. the same format as the extended option help described in section 2.6. 
  1026. Each section begins with a label such as ":W_Colors" and ends with a 
  1027. matching label, in this example, ":End_W_Colors".
  1028.  
  1029. On the next line is the "window" line which defines what the window will
  1030. look like and where it will be placed. Batmnu calculates the size of the
  1031. window based on the strings following the window line and before the end
  1032. label. Continuing with the above example, "W_Colors", here is the section
  1033. from BATMNU.HLP:
  1034.  
  1035. :W_Colors
  1036.    window, r11, oYEL, tRED, fWHI, +
  1037.       __These switches define the menu colors:
  1038.       
  1039.       f - Foreground Color  b - Background Color
  1040.       t - Title/Msg Color   o - Option Color
  1041.       h - Hotkey Color      k - Screen Colors
  1042. :End_W_Colors
  1043.    
  1044. The window's first line is row 11 (r11), the title is bright red (tRED),
  1045. the help text is bright yellow (oYEL), the window border color is bright
  1046. white (fWHI) and the title separator is joined to the border (+). The 
  1047. underscores (_) in front of "These..." are hard spaces. They are neces-
  1048. sary to indent the line in relation to the others. Batmnu ignores leading
  1049. spaces otherwise.
  1050.  
  1051. If you decide you want to alter or add to the information in the file,
  1052. here are a few things to remember. 
  1053.  
  1054.      - The window should start at row 8 or more and end at row 22 or less
  1055.      unless you don't care if it covers the other text on the screen. In
  1056.      that instance, it can extend from row 1 to 25. The background text
  1057.      is not disturbed in any case.
  1058.  
  1059.      - The labels cannot be altered. These are hard coded into BATMNU at
  1060.      present. If changed, the program would not be able to find the help
  1061.      section.
  1062.  
  1063.      - Make sure that, if you add strings to a section, you adjust the
  1064.      window's beginning row accordingly.
  1065.  
  1066.  
  1067.                                     16
  1068.