home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / UT / UT126.ZIP / BMENU54.DOC < prev    next >
Text File  |  1990-09-17  |  14KB  |  366 lines

  1.  
  2.  
  3.  
  4.  
  5.                      ┌─────────────────────────────────────┐
  6.                      │    ░▒▓█  Batch Menu System █▓▒░     │
  7.                      │                                     │
  8.                      │            Pop up menus             │
  9.                      │          right in your own          │
  10.                      │            batch files!             │
  11.                      │                                     │
  12.                      │  BMENU 5.4                 2/12/90  │
  13.                      │  (C) 1990 by Mark Strong            │
  14.                      └─────────────────────────────────────┘
  15.  
  16.  
  17.  
  18.               Mark Strong  6029 Eastridge Lane  Cincinnati, OH  45247
  19.                              CompuServe [70043,114]
  20.                             USENET: strong@cinnet.com
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.                              TABLE OF CONTENTS
  29.  
  30.      Usage............................................................1
  31.  
  32.      Multiple Menus...................................................2
  33.  
  34.      Color............................................................3
  35.  
  36.      Notes............................................................4
  37.  
  38.      Disclaimer.......................................................5
  39.  
  40.      Registration.....................................................6
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.                                                                       Page 1
  49.     USAGE:
  50.  
  51.     The  Bmenu - Batch Menu System allows you to insert pop-up menus within 
  52.     a batch file.
  53.  
  54.     Similar to the Norton Utilities ASK function,   BMENU returns the error-
  55.     level of  the item selected.   BMENU allows the choice of menu location,
  56.     title, item list and optionally, color.
  57.  
  58.     For example, the command (using default black and white colors):
  59.  
  60.          bmenu 10 5 Title Choice1 Choice2 Choice3
  61.  
  62.     would produce a menu at row 10,  column 5,  with title "Title" and three
  63.     choices.  If  the user selects choice 1,  the errorlevel return is  1,
  64.     choice 2 returns errorlevel 2, and so on.  If ESC is pressed, errorlevel 0
  65.     is returned to trap a "no choice made" condition.  Control-Break (or ^C)
  66.     also returns errorlevel 0.
  67.  
  68.     You can also use quotes to use multi-word choices:
  69.  
  70.          bmenu 10 5 "My Menu" Choice1 Choice2 "Another Choice"
  71.  
  72.     or use an @file:
  73.  
  74.           bmenu @filename.ext
  75.  
  76.     The @file must have the format of one command line argument per line.
  77.     For the last example, filename.ext would contain:
  78.  
  79.          10
  80.          5
  81.          My Menu
  82.          Choice1
  83.          Choice2
  84.          Another Choice
  85.  
  86.  
  87.     Several example batch files are included to demonstrate various uses
  88.     of Bmenu, including @files and color definitions.
  89.                                                                       Page 2
  90.     MULTIPLE MENUS:
  91.  
  92.     @file listings may now have multiple menus within a single file.  Simply
  93.     delimit the menus with the dollar sign ($) and then a label ($mymenu).
  94.     Then call bmenu as follows:
  95.  
  96.     bmenu @file mymenu
  97.  
  98.     Bmenu will search the @file until the label is found and read the commands
  99.     until the end of file, or the next $ menu is found (or an $end_label).  If 
  100.     you need to use the dollar sign in a menu choice, use quotes around the 
  101.     entire choice, and Bmenu will consider the line an argument rather than 
  102.     a multiple menu label.
  103.  
  104.     Nesting of menus within batch files will also work if you begin and end
  105.     the menu portion of the file with $label and $end.  The two dollar sign
  106.     labels will tell Bmenu that this is the menu definition, and it will use
  107.     that data for the menu.  Simply put the menu data at the end of the batch
  108.     file, or have a GOTO statement jump over the menu definition.  
  109.     (For example, its fine to have "BMENU @batch.bat menu1" within batch.bat)
  110.  
  111.     Comments are also allowed.  Any line beginning with a colon (;) is ignored
  112.     by bmenu.  
  113.  
  114.     Example of nested batch file menu "nested.bat" :
  115.  
  116.         echo off
  117.         goto main
  118.         ; 
  119.         ; Menu Def below
  120.         ;
  121.         $menu1
  122.         10
  123.         10
  124.         Title
  125.         Choices
  126.         Choice 2
  127.         $end_menu
  128.         ;
  129.         ; Batch file below
  130.         ;
  131.         :main
  132.         bmenu @nested.bat menu1
  133.         if errorlevel 2 goto 2
  134.         if errorlevel 1 goto 1
  135.         if errorlevel 0 goto esc
  136.         :2
  137.         echo Choices was chosen
  138.         goto end
  139.         :1
  140.         echo Choice 2 was made
  141.         goto end
  142.         :esc
  143.         echo User ESC'd the menu
  144.         :end
  145.  
  146.                                                                       Page 3
  147.     COLOR:
  148.     
  149.         User defined colors are now available on the command line.  Simply 
  150.     follow the row and column numbers with a dash then the window, menu, 
  151.     and selection bar color numbers, in decimal.  For example,
  152.  
  153.             bmenu 10 10 -3 5 65 title choice1 choice2
  154.  
  155.     would produce a cyan border with magenta menu choices and a red bar with
  156.     a blue word for the current menu choice.  The colors may also be included
  157.     in an @file, with the above example being:
  158.  
  159.            10
  160.            10
  161.            -3
  162.            5
  163.            65
  164.            title
  165.            choice1
  166.            choice2
  167.  
  168.  
  169.     The color combinations are made by adding the decimal values of the 
  170.     foreground and background colors.
  171.  
  172.                  ┌───────────────────────────────────┐
  173.                  │ ░▒▓█     Color Attributes    █▓▒░ │
  174.                  └───────────────────────────────────┘
  175.  
  176.    Foreground Colors:
  177.  
  178.    Black            0               Gray                  8
  179.    Blue             1               Light Blue            9
  180.    Green            2               Light Green           10
  181.    Cyan             3               Light Cyan            11
  182.    Red              4               Light Red             12
  183.    Magenta          5               Light Magenta         13
  184.    Brown            6               Yellow                14
  185.    Light Gray       7               White                 15
  186.  
  187.  
  188.    Background Colors:
  189.    
  190.    Black            0
  191.    Blue             16
  192.    Green            32
  193.    Cyan             48
  194.    Red              64
  195.    Magenta          80
  196.    Brown            96
  197.    White            112
  198.                                                                       Page 4
  199.     NOTES:
  200.  
  201.     Typing `bmenu' alone lists the usage of the program.
  202.  
  203.     Feel free to comment or make suggestions, but if you find the program 
  204.     useful, please register.  I appreciate the distribution via BBS's and
  205.     disk vendors, and permission is granted to make copies of BMENU for 
  206.     this purpose.  Feel free to distribute the program to friends and others
  207.     who can make use of a batch menu system.
  208.  
  209.     With the addition of multiple menu @files, Bmenu has become VERY network
  210.     compatible.  Try it instead of numerous ECHO statements for menus.
  211.  
  212.     Portions of this program Copyright 1986,1987 New Dimension Software.
  213.  
  214.     Address correspondence to:   
  215.     Mark Strong  6029 Eastridge Lane  Cincinnati, OH  45247
  216.     or           8921 B Harperpoint Dr Cincinnati, OH  45249  
  217.  
  218.     CompuServe mail: [70043,114]
  219.     USENET: strong@cinnet.com
  220.     ________________________________________________________________________
  221.  
  222.     Update History:
  223.  
  224.     1.0  -  original offering, 3/22/89 or so?
  225.  
  226.     2.0 -  added color, if you want it, thanks to H. C. Wottle, 5/89 
  227.  
  228.     3.0 -  changed errorlevel return value so that ESC returns 0,
  229.            and choice 1 = errorlevel 1, etc.
  230.            Thanks to W. F. Hines, 11/15/89
  231.  
  232.     4.0  -  added @file capability, fixed choice handling for consistent
  233.            spacing, and cursor size,  12/04/89
  234.  
  235.     5.0  -  added optional color definition on the command line, 1/14/90
  236.     5.2  -  fixed bug in command line @file definition, spotted by T.Clark
  237.            1/29/90
  238.     5.3 -  added optional multi-menu @files, again thanks to T.Clark, 1/31/90
  239.     5.4 -  Corrected handling of ^C and Ctrl-Brk, 2/12/90
  240.  
  241.     I hope anyone reading this replaces the BMENU, BMENU2-A, BMENU2-B,
  242.     BMENU3, BMENU4, and BMENU5 files floating around with this file,
  243.     BMENU54.ZIP dated 02/12/90.
  244.                                                                       Page 5
  245.     DISCLAIMER:
  246.  
  247.  
  248.     THIS SOFTWARE, MANUAL AND SUPPORTING FILES ARE SOLD "AS IS" AND WITHOUT
  249.     WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES
  250.     WHETHER EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS HARDWARE AND SOFT-
  251.     WARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF 
  252.     FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
  253.  
  254.     THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY LIABILITY
  255.     OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR 
  256.     REFUND OF THE PURCHASE PRICE.
  257.  
  258.      
  259.          
  260.               _______
  261.          ____|__     |               (tm)
  262.       --|       |    |-------------------
  263.         |   ____|__  |  Association of
  264.         |  |       |_|  Shareware
  265.         |__|   o   |    Professionals
  266.       -----|   |   |---------------------
  267.            |___|___|    MEMBER
  268.  
  269.         
  270.          Mark Strong is a member of the Association of Shareware
  271.     Professionals (ASP).  ASP wants to make sure that the shareware 
  272.     principle works for you. If you are unable to resolve a shareware-
  273.     related problem with an ASP member by contacting the member directly, 
  274.     ASP may be able to help. The ASP Ombudsman can help you resolve a 
  275.     dispute or problem with an ASP member, but does not provide technical
  276.     support for members' products. Please write to the ASP Ombudsman at
  277.     P.O. Box 5786, Bellevue, WA 98006 or send a Compuserve message via 
  278.     easyplex to ASP Ombudsman 70007,3536
  279.  
  280.                                                                       Page 6
  281.     REGISTRATION:
  282.  
  283.     The cost to register one copy of Bmenu is $10.00.  Registration is 
  284.     required if you choose to continue to use the program.  Registration
  285.     entitles you to legally use the program on a single computer, under a
  286.     single user application.  Use on network file servers for multiple users
  287.     is provided only under a site license agreement.  Please write for further
  288.     details.  Registration also includes:
  289.     
  290.     o  A free CompuServe IntroPak, which includes a $15.00 usage
  291.        credit, available to Bmenu registered users who do not 
  292.        yet subscribe to CompuServe.  CompuServe will open the door
  293.        for a whole new world of information, services, and interesting 
  294.        people.  CompuServe is also the best place to obtain technical 
  295.        support from the author of Bmenu (and many other vendors and 
  296.        developers).  This CompuServe IntroPak (a $39.95 value) is provided
  297.        to Bmenu registered users compliments of CompuServe, Inc.
  298.     
  299.     For a contribution of $15.00 or more, you receive the above benefits
  300.     plus the latest version of Bmenu or the next release, whichever is 
  301.     applicable, via postage paid first class mail.  Use the following 
  302.     registration form to submit your payment.
  303.  
  304.     You can also purchase a registered disk from the Public (software) 
  305.     Library using your MasterCard, VISA, Amex or Discover.  Read the
  306.     following registration form for more information.
  307.     
  308.     Thank you very much for supporting shareware!
  309.                                  Bmenu 5.4
  310.                              Registration Form
  311.  
  312.            (C) Copyright 1990 by Mark Strong.  All Rights Reserved.
  313.  
  314.  
  315. Name            ________________________________
  316.  
  317. Address         ________________________________
  318.  
  319. City, State     ________________________________
  320.  
  321. Zip             ________________________________
  322.  
  323.  
  324. Where did you obtain this copy of Bmenu 5.4? ________________________________
  325.  
  326. ____________________________________________________________________________
  327.  
  328.  
  329. Comments/Suggestions: ______________________________________________________
  330.  
  331. ____________________________________________________________________________
  332.  
  333.  
  334. The cost to register one copy of Bmenu is $10.00.  Registration entitles
  335. you to legally continue to use the program, plus written notification of 
  336. future versions and phone support after initial mail or CompuServe contact.
  337. For a contribution of $15.00 or more, you receive the above benefits plus the 
  338. latest version of Bmenu or the next release, whichever is applicable, via 
  339. postage paid first class mail.  (Site licenses are also available, write for
  340. info and include expected usage.)  Please make checks or money orders payable 
  341. to Mark Strong, and send to the address listed at the bottom of the page. 
  342. Thank you for your interest, and for supporting Shareware products.
  343.  
  344. You can also order with MasterCard, VISA, Amex or Discover from the Public
  345. (software) Library (PsL) by calling 1-800-2424-PsL or 713-524-6394 or by
  346. FAX to 1-713-524-6398 or by CIS Email to 71355-470.  These numbers are for
  347. orders only.  To insure that you get the latest version, PsL will notify 
  348. us the day of your order and we will ship the product directly to you.
  349. Any questions about the status of the shipment of the order, refunds, product
  350. details, technical support, volume discounts, dealer pricing, site licenses,
  351. etc, must be directed to Mark Strong at the address below.  You can also mail
  352. credit card orders to PsL at P.O. Box 35705, Houston, TX 77235-5705.  
  353.  
  354. Please check:  Registration ($10) ____   Registration + disk ($15) ______
  355.  
  356.                Site License Info  ____   Expected use:  _________________
  357.  
  358.            Circle Disk Size (if $15.00 or more) :    5.25       3.5
  359.  
  360.                Additional disks:                   ____ x $5 = ___________
  361.  
  362.                                                Total Enclosed: ___________
  363.  
  364. Please remit to:  Mark Strong   6029 Eastridge Lane  Cincinnati, OH  45247
  365.  
  366. or call 1-800-2424-PsL to order from the Public (software) Library