home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
- BATBOX.EXE 2.2
- Copyright 1991 by Chuck Steenburgh
-
- People have been creating menus with batch files for
- years. Some of these are quite elaborate, others very crude.
- BATBOX is something in between. BATBOX will allow you to
- display an attractive, colorful menu and will wait for
- the user to make a selection. It will then set an appro-
- priate ERRORLEVEL value which can be used to determine sub-
- sequent actions in your batch file.
-
- Usage: BATBOX menufile [/C] [/Dn] [/H] [/O] [/Q] |
-
- menufile is the name of an ASCII text
- file which you create. This
- will contain the menu's title
- and a list of options.
-
- /C Normally, the longest menu item
- is centered in the menu box and
- subsequent items are left-aligned
- below it. This switch will cause
- each menu item to be centered in
- the menu box.
-
- /Dn Date/time format. Current valid |
- values for n are: |
-
- 1 Display time using 12-hour |
- clock with AM/PM |
- - Turn off date/clock display |
-
- /H Generates help screen.
-
- /O Ordinal menu selection. Instead
- of returning an errorlevel based
- on the hotkey, returns an error-
- level based on the ordinal pos-
- ition of the selected menu item.
-
- /Q Quiet mode suppresses all sounds.
-
- To create a menufile, use a text editor, word processor that
- can save ASCII files, or EDLIN.COM or EDIT.COM that come with
- DOS. In a pinch, you can use the "copy con" command but this
- doesn't give you much in the way of an editing capability.
-
- The structure of the menufile is simple. The first line
- contains your menu's title, up to 60 characters. If you
- don't want a title, leave the line blank, without any spaces.
- (Hint: press RETURN immediately without doing anything else
- when you first begin editing your document.) Each succes-
- sive line contains a menu item, exactly as you want it to ap-
-
- Page 1
-
-
-
-
-
- pear on the screen. Do NOT include any blank lines here or
- you will end up with blank lines in your menu!
-
- A few limitations: each line can contain no more than 60
- characters (if you need more than this to describe your menu
- choices, maybe you need Microsoft Windows, a Macintosh, or
- something else with lots of pictures). In addition, your menu
- items (but NOT the menu title) should each begin with a dis-
- tinct letter in order for the selection function to work pro-
- perly. The selection function for BATBOX is case-insensitive,
- so if you begin one line with the letter 's' and the other
- with the letter 'S', these are considered the same. Up to
- 10 menu items are permitted in any one file.
-
- When you type BATBOX on the command line followed by the
- name of your menufile (they must both be in the current dir-
- ectory), you will see a menu pop up in the middle of the
- screen. The title will appear at the top, with each of your
- menu items (up to ten) appearing at double spaced-intervals
- inside the menu box. Each item will also be numbered from 1
- to 0 (the 10th item being numbered "0"). At the bottom of the
- menu you will see a the message "Enter your menu choice: ".
- If you have a color monitor, you will notice that the first
- letter (the "hotkey") of each menu item appears in a different
- color than the rest of the text. The time and date will also
- be displayed at the top of the menu.
-
- Selecting a menu item is as simple as pressing the first
- letter in the name of that item (the "hotkey") OR by pressing
- the number key that corresponds to that menu item. BATBOX will
- then exit, and return an errorlevel based on the hotkey. See
- Appendix 1 for a list of legal first letters and the error-
- levels that are returned by BATBOX. If you select the /O op-
- tion, BATBOX will return the position of the selected menu item
- via the errorlevel. For example, if you select the 1st item on
- the list and have specified /O, the errorlevel will be set to
- 1. If you select the 5th item, the errorlevel will be 5, and
- so on. You can use the errorlevel value that is returned to
- branch to different parts of your batch file or to execute
- commands. See the DEMO.BAT file for an example of one way to
- do this. (DEMO.BAT is part of the STUF??.ZIP archive which
- contains demonstration files for all of the STEENBURGH'S STUFF
- utilities).
-
- The errorlevel that is returned is affected only by the /O
- switch, and NOT by whether the item is selected via the hotkey
- or the item number.
-
- If you press a key that is neither a valid hotkey or an item
- number, BATBOX will sound a tone and you will be required to
- make another selection.
-
- If you enter BATBOX alone on the command line without any |
- parameters, the help screen will be displayed. |
-
- Page 2
-
-
-
-
-
-
- Customizing Colors |
-
- Beginning with version 2.1, BATBOX users can customize their |
- menu's colors by using a small text file called BATBOX.CFG. |
- Using the color codes from Appendix 3 of STEENBURGH'S STUFF |
- documentation, enter a color value into a text file for the |
- following items, one entry per line: |
-
- Line # (BATBOX.CFG) Controls Valid Values |
- =================== ======== ============ |
- 1 Menu color 1-127 |
- 2 Menu border type 1-4 |
- 3 Menu shadow pattern 1-3 |
- 4 Menu title color 1-255 |
- 5 Menu interior color 1-127 |
- 6 Menu item color 1-255 |
- 7 Hot key color 1-255 |
- 8 Item # color 1-255 |
- 9 Prompt message color 1-255 |
- 10 Date/time color 1-255 |
-
- See the enclosed file BATBOX.CFG for an example. |
-
-
- DISCLAIMER
-
- The programs described in this documentation are guaran-
- teed to do absolutely nothing! They have, however, in my exper-
- ience performed essentially as described herein. The author
- will not be responsible for any loss or damages caused through
- the use of these programs. No warranty, express or implied,
- is provided for this software's performance, merchantability,
- or fitness for a particular purpose.
-
- All trademarks are property of their respective owners.
-
- The programs and documentation are Copyright 1991,1992 by
- Chuck Steenburgh. You are encouraged to distribute these pro-
- grams provided the following conditions are met:
-
- - all files contained in the archive or distribution disk
- must be distributed together in UNMODIFIED form
-
- - you charge no more than a reasonable fee for copying or
- subscription, and clearly indicate that payment of such
- a fee does NOT grant ownership of the programs.
-
- This program is part of set of utilities known as STEEN-
- BURGH'S STUFF (Mildly Useful Utilities). The full set of
- utilities includes the following programs:
-
- BATBOX: Simple menu creation/input system
- CLK: Displays time on screen
-
- Page 3
-
-
-
-
-
- DOSVER: Checks for DOS version currently running
- FREEDISK: Checks for available disk space
- HOWMUCH: Displays space occupied by a group of files
- INPUT: Simple prompt/input system
- KLS: Colorful screen-clearing utility
- LAUNCHER: File selection/execution system
- MUSIC: Plays transcribed sheet music on the PC
- RAND: Random number generator
- SKIP: Prints blank lines from batch files
- SOUNDER: Wide range of noise making options
- WAITFOR: Timed pauses
- WHENISIT: Date/time telling utility
- WRITE: Colorful output anywhere on screen
- XD: Create/switch directories at the same time
-
- Payment of the $10 registration fee automatically registers
- you for the full set.
-
- You may evaluate these programs for up to 30 days on a free
- trial basis. After 30 days, you should register your use of
- these programs. The registration fee is $10, payable to the
- author at the address given below. IMPORTANT NOTICE: Effective
- 1 March 1992, the registration price for STEENBURGH'S STUFF will
- increase to $20 with a $5 discount for payment by cash, check,
- or money order. This price change will be implemented in con-
- junction with the release of Version 2.0 of STEENBURGH'S STUFF.
-
- Let's be real: I don't plan to make alot of money this way.
- Registration does have its advantages:
-
- - I am improving these programs all the time. Registration
- will get you IMMEDIATELY a disk with the latest version.
- You will also get the next major release of the program
- sent to you free of charge.
-
- - While I can't promise to include everyone's suggestions
- in program updates, you can bet I'll listen to registered
- users before any of you scrounges out there.
-
- - You will me feel all warm and fuzzy and appreciated, and
- all that good stuff.
-
- - You will also get an evaluation copy of my text-file for-
- matting program (used to produce the margins in this doc-
- ument), and any other electronic creations I have decided
- to unleash on a foolish, unsuspecting world.
-
- Send comments/registrations to:
-
- Chuck Steenburgh
- 304A North Main Street
- Lexington, VA 24450
- (703)464-5290
-
-
- Page 4
-
-
-
-
-
- !!!VIRGINIA RESIDENTS ADD 4.5SALES TAX!!!
-
- CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 5