home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
So Much Shareware 1
/
SoMuchSharewareV1_1991.iso
/
util1
/
btx101.exe
/
lha
/
BTX.DOC
< prev
next >
Wrap
Text File
|
1991-01-30
|
57KB
|
1,374 lines
┌─────────┐
┌─────┴───┐ │ (tm)
──│ │o │──────────────────
│ ┌─────┴╨──┐ │ Association of
│ │ │─┘ Shareware
└───│ o │ Professionals
──────│ ║ │────────────────────
└────╨────┘ MEMBER
BTX v1.01
A Batch File Utility
DESCRIPTION
BTX is a switch-driven, menu utility ideal for systems consultants
that want fast AND simple batch file menuing or for software authors
that are looking for a way to tie modules together to give large
independent systems a more contiguous feel. BTX is also very
appropriate for anyone who is already using batch files to automate
their day-to-day computer tasks.
Unlike other full-blown menu systems, BTX can be run from the
command line without external data file support.
BTX floods the screen and produces a window containing a number of
options. Users select options using the up/down arrow keys,
pressing a single hot key or via a MS compatible mouse. BTX exits
with ERRORLEVELs equal to the number of item selected.
What makes BTX unique is that you can produce a darn attractive menu
directly from the DOS prompt without data files to lose or slow you
down. However, BTX can use external data for building complex menu
systems, complete with context sensitive help.
BTX can be fully configured to carry your name/your product's name
on the header line as will as in F1 help screens. You can give your
users the impression that they are using YOUR program, not BTX.
Best of all, the full BTX executable is under 50K. After you
configure it, this can be reduced to just under 25K using a
compressor such as LZEXE. This means that BTX fits well on 360K
floppies; an excellent way to tie everything together.
BTX is designed to run in 80 column, 25 line mode. I considered
supporting 43/50 modes but decided against it for now. If you are
interested in a version like this, please make your opinion known.
HISTORY
A few years back, I wrote a program called BATMEN. This was a
simple version of BTX that had much of the same look and feel. I
had written a golf stats analysis product called DBK that used
BATMEN as the front-end. The problem was, BATMEN did not have all
of the same control features found in DBK. One of the most obvious
was the lack of mouse support. As I began to rip apart BATMEN, I
realized it would be just as fast to start over. Thus, BTX was
created.
If you do not know what BATMEN is, then ignore references to this
product. You DO NOT need BATMEN to use or understand BTX.
NOTE TO BATMEN USERS
BTX offers all the features of BATMEN but the switch set is not 100%
compatible. A few of the previous switches had to be changed to
circumvent ambiguity. Specifically, you will have to make these
changes to your BATMEN batch files if you want to use BTX in place
of BATMEN:
BATMEN BTX DESCRIPTION
┌────┬─────┬─────────────────────────────────────┐
│ /b │ /bt │ border type │
│ /m │ /m" │ read menu items from text file │
│ /h │ /hd │ text string used as screen header │
│ /? │ /?" │ text file containing help lines │
│ /! │ /st │ Show stats 1=RAM 2=Drive space │
│ /# │ /st │ │
│ /p │ /p? │ Password protect menus │
└────┴─────┴─────────────────────────────────────┘
SAMPLES.COM contains lots of BAT files that demonstrates the various
command line switches. Run SAMPLES if you would like to see how
to use these.
SWITCHES
The next few paragraphs is targeted at individuals that are
not familar with switch based utilities. If you are comfortable
with programs like ZIP and LHarc, please skip/skim ahead to the
section that beings with SWITCHES SORTED A to Z.
BTX is heavily laden with features. All of these are available
via "the switch". A switch is something that you put after the
program name. For example, DIR /w displays a multi-column format
of files, right? The /w is a switch. Some programs like to use
dashes to denote switches. However, if you try DIR -w, you get
nuthin! All BTX switches begin with the forward slash. After
the slash comes one or more characters to tell BTX what to do
with that menu. How about an example:
BTX /info
The /info switch tells you what version of BTX you are running,
whether or not it has been installed, and my current mailing
address.
Here are two more for you to try:
BTX /sw1 BTX /sw2
These will give you a complete listing of available switches IF
BTX has not been installed using the /config switch.
YOUR FIRST MENU
Making menus with BTX is darn easy. Here's all there is to it.
Enter BTX on the DOS line followed by a few words. Make sure to
separate each word with a space and end each word with a capital
letter. Observe:
BTX OneO TwoT tHreeH FourF
The capital letters are used to define hot keys. A hot key is
a fast way to select items in BTX menus. You will notice that
the hot keys in this menu will be OTH and F. This means that
when the menu is visible, these keys can be used to select an
item. The third item uses a capital H because the T was already
used by the Two option.
In this example, no switches were used. Remember, a switch must
be initiated with a forward slash. It can appear anywhere in the
command line, before, during or after the menu items.
If you enter this one, you will see a box in the relative center
of your screen containing One, Two, tHree and Four. The capital
letter will be highlighted in each item. To navigate within, use
the up/down arrow keys, home or end to move the menu pointer.
When the pointer rests on top of the item that you wish to select,
press ENTER. The faster method of selecting items is with the
hot keys. To select item Four, all you do is press F. The other
way, the minimum number of keystrokes would be 2 (END and ENTER).
MOUSE CONTROL
If your desk has room for one of the tailed creatures, you will
be able to control BTX menus this way. It must be a Microsoft
compatible mouse with the appropriate mouse driver loaded. If BTX
detects a mouse, you will see a very small dot to the immediate
right of the clock in any of the BTX menu screens.
SWITCH BASICS
Moving right along, now let's try a menu call that uses a switch.
Going back to the first example, you may have noticed that you
were unable to simply pop the ESC key to exit. We can fix that.
By including the /esc switch, we tell BTX to allow exiting via
ESC or right clicking the mouse. To do this, all we have to do
is enter the same BTX command again, this time inserting/appending
the /esc switch.
BTX OneO TwoT tHreeH FourF /esc
There, now the menu will respond to the ESC key. Remember, BTX
cares not about where you put your switches. Just be sure to
include the forward slash. In other words, this BTX call would
produce the same menu.
BTX OneO TwoT /esc tHreeH FourF
Think of it this way. If it doesn't begin with a / then it's
going to appear in your menu!
SWITCH ARGUMENTS
Some switches require only the switch while others require a value
to modify the function of the switch. For example, the /esc switch
is used by itself. It's a binary type of switch - either it's OFF
or ON. But suppose you want to change the color of something in
a menu. This is when you would use a switch argument.
There are three types of arguments. Numerical, Message and File.
NUMERICAL ARGUMENTS
To modify a switch, you will follow the switch with a number or
some additional characters. The /bt switch is one that requires
a numerical argument. /bt sets the border type. Because there
is more than one type, you need to tell BTX which one to use.
BTX OneO TwoT tHreeH FourF /bt1
└─────── use border type 1
Using /bt1, your menu will appear as:
┌───────┐
│ One │
│ Two │
│ tHree │
│ Four │
└───────┘
By default, BTX does not use any border characters. When using
switches, just be sure to include the necessary argument directly
after the switch itself. NEVER put a space between the switch
and the argument!
MESSAGE ARGUMENTS
A message argument, as you might guess, is used to produce a screen
based message. Headers and footers are the best examples of this
type of switch. Suppose that you wanted a menu to use a person's
name in the header line.
BTX OneO TwoT tHreeH /hdFred's_Menu
In this example, the top line would include Fred's Menu. You must
use underscores to connect words, otherwise BTX would not know that
it's all part of the same switch.
FILE ARGUMENTS
The last type is the file argument. This comes into play when you
will be using external data files to supply information to your
menus. For example, suppose that you had a menu that contained
menu selections that required several words to describe. Without
using an external data file, you might very well run out of command
line space. Remember, by default, DOS only recognizes the first
128 characters.
Therefore:
BTX Defragment_drive_after_deleting_all_BAK_filesD eXitX
IF you wanted to get this wordy with each menu description, you
can easily see how quickly the 128 character limit is consumed.
Here's all you would do to handle this problem:
BTX /m"C:\DAT\MENU.DAT"
When BTX runs, it will look in C:\DAT for a text file called
MENU.DAT. This file should contain one menu item per line, up to
a maximum of 10 items. Here's what the MENU.DAT might look like:
Defragment_drive_after_deleting_all_BAK_filesD
Backup_all_modified_files_to_tapeB
run_antiVirus_detection_programV
eXitX
Because these are being loaded from disk, the underscores may be
removed. However, you must still end each one with a character that
will be used as a hotkey. Remember to start each item in column 1
and to left justify each. By default, BTX will center each item.
REMOVING HOT KEYS
Don't like hot keys? Fine. Just enter a trailing character
that DOES NOT appear in the menu item.
BTX One! Two@ Three# Four$
To be perfectly honest, this does not actually remove the hot
key, it just hides it. In this instance, pressing ! would select
item One, @ would select Two and so on.
There! Now you're a BTX pro. See, BTX is very simple. All
you have to do is decide how you want the menus to appear, then
use the appropriate switches.
Of course, BTX will select the appropriate default colors based on
type of monitor detected. However, you can be the final judge
of how each menu appears.
Once you have worked with BTX for a while, you will soon learn that
using command line switches gives you complete control over the
appearance and performance of your menus.
HOW BTX MENUS WORK
Is it enough to just do a BTX OneO TwoT tHreeH FourF eXitX?
No, it sure is not. DOS just doesn't let you off the hook
that easy. In order to really use BTX menus, you need to
understand, just a little bit, what a batch file is.
When you run BTX, you select a menu item. BTX then exits back
to DOS, telling it which one you wanted. It is then up to the
batch file to ensure that the user's request is satisfied.
You're never going to build a menu with OneO TwoT tHreeH in it,
so let's use something more real life.
BTX Run_123R Backup_all_WKS_filesB eXitX
This menu allows the user to run a spreadsheet or copy all WKS
files to a floppy drive. (Note that spaces WITHIN a menu item
are connected with an underscore.)
To begin, you should create a batch file called BACKUP.BAT
If you do not have a text editor, use TED.COM
TED BACKUP.BAT
Enter these lines (everything between the dashes)
--------------------------------------------------------------
echo off
cls
:main
BTX Run_123R Backup_all_WKS_filesB eXitX
if errorlevel 3 goto end
if errorlevel 2 goto bakup
if errorlevel 1 goto ss
goto main
:ss
cd\lotus
123
goto main
:bakup
cd\lotus
copy *.wks A:
goto main
:end
--------------------------------------------------------------
┌──────────────────────────────────────┐
:main │ ┌─────────────────────┐ │
BTX Run_123R Backup_all_WKS_filesB eXitX ─┐ │ │
if errorlevel 3 goto end <────────────────┘ │ │
if errorlevel 2 goto bakup <─────────────────┘ │
if errorlevel 1 goto ss <──────────────────────┘
goto main
This is the only tricky part to remember. The ERRORLEVEL
statements must run in descending order. If you have 7 items,
then your first errorlevel will be IF ERRORLEVEL 7 ...
Everything else is very straight-forward. All you would do
is enter whatever sequence of commands necessary to do whatever
the menu implies. In the case of this one, what commands would
the user normally enter to load 123? Just put those after the
:ss statement label. Simple.
If you are not sure of this, pick up a copy of PC-Magazine's DOS
Power Tools. They have lots of great pointers on how to become a
batch file fool.
SWITCHES SORTED A to Z
Here is a list of the available switches. Following this
and the next listing of the switches, each is fully described.
Be sure to run SAMPLES.COM if you would prefer to learn by
example. SAMPLES is a self-extracting file that contains
over 30 BAT files that demonstrate most of the switches.
/* Save screen after x secs OFF
/? text file containing help lines OFF
/a screen attribute of the flood char 18
/ba border attribute 112 or 30
/bt border type (0=none 1=sngl 2=db...) 0
/c Color attribute of normal text 112 or 30
/d Delay used for screen clearing 10ms
/e How screen clears on exit 0
/esc Allow ESC'ing from menus OFF
/f flood character 178
/fa footer " 112
/fhf F1 help file NONE
/fm F1 message attribute 112 or 30
/ha header " 112
/hd text string used as screen header OFF
/hka hot key attribute 112
/hkd Hot key delay after entry (in ms) 50
/hkp Hot key pause. Waits for <CR> OFF
/info Shows version #, type and my address
/m" read menu items from text file OFF
/mti menu title eg. MAIN MENU NONE
/mtj menu text justification C
/ncc Turn control breaking OFF (No Cltr-C) OFF
/o select this item on autoexit (/w) NA
/p? Password protect menu items OFF
/pb pad character (usually 32) 32
/s sound on exit OFF
/sba Stat box attribute 75
/sf footer text (def=Use Up/Dn keys...)
/sha attribute of the shadow character 3
/shc shadow character 176
/shdw shadow the menu OFF
/sm side margins 2
/st Show stats 1=RAM 2=Drive space OFF
/sw1 Shows switch screen #1
/sw2 Shows switch screen #2
/t text attribute of hilited menu item 15
/tt Time type (def=13:00:01) ON
/w wait this many secs, then lauch /o OFF
/~ Twinkle screen using this delay OFF
This version of the switch is list designed for keyboard reference.
┌───────────────────STANDARD BATMEN SWITCH SET────────────────────────────┐
│SWITCH FUNCTION DEFAULT RANGE │
├────┬──────────────────────────────────────────────┬─────────────────────┤
│ /f │ flood character 178 │ /f33 - /f219 │
│ /a │ screen attribute of the flood char 18 │ /a1 - /a127 │
│ /t │ text attribute of hilited menu item 15 │ /t1 - /t127 │
│ /c │ Color attribute of normal text 112 or 30 │ /c1 .. c/127 │
│ /bt│ border type (0=none 1=sngl 2=db...) 0 │ /b0 .. /b6 │
│ /o │ select this item on autoexit (/w) │ /o1 .. /omax_items │
│ /w │ wait this many secs, then lauch /o OFF │ /w1 - /w32767 │
│ /s │ sound on exit OFF │ /s50 - /s255 │
│ /m"│ read menu items from text file OFF │ /m"C:\menu1.dat │
│ /hd│ text string used as screen header OFF │ /hMY_OWN_MENU │
│ /? │ text file containing help lines OFF │ /?C:\help.dat │
│ /e │ How screen clears on exit 0 │ /e0 .. /e9 │
│ /d │ Delay used for screen clearing 10ms │ /d0 .. /d100 │
│ /* │ Save screen after x secs OFF │ /*1 .. /*600 │
│ /st│ Show stats 1=RAM 2=Drive space OFF │ /st1 .. /st4 │
│ /p?│ Password protect menu items OFF │ /pCODE (4 chars max)│
│ /~ │ Twinkle screen using this delay OFF │ /~1 .. /~5000 │
├────┴──────────────────────────────────────────────┴─────────────────────┤
│ BTX - EXPANDED SWITCH SET SAMPLES/RANGES │
├──────┬────────────────────────────────────────────┬─────────────────────┤
│ /ba │ border attribute 112 or 30 │ │
│ /ha │ header " 112 │ │
│ /fa │ footer " 112 │ │
│ /fm │ F1 message attribute 112 or 30 │ │
│ /mtj │ menu text justification C │ L,R or C eg. /mtjL │
│ /mti │ menu title eg. MAIN MENU NONE │ /mtMAIN_MENU │
│ /pb │ pad character (usually 32) 32 │ │
│ /sf │ footer text (def=Use Up/Dn keys...) │ │
│ /sm │ side margins 2 │ │
│ /hka │ hot key attribute 112 │ │
│ /shdw│ shadow the menu OFF │ │
│ /shc │ shadow character 176 │ │
│ /sha │ attribute of the shadow character 3 │ │
│ /esc │ Allow ESC'ing from menus OFF │ │
│ /ncc │ Turn control breaking OFF (No Cltr-C) OFF │ │
│ /tt │ Time type (def=13:00:01) ON │ 1-16 │
│ /sba │ Stat box attribute 75 │ /sba112 │
│ /hkp │ Hot key pause. Waits for <CR> OFF │ /hkp │
│ /hkd │ Hot key delay after entry (in ms) 50 │ /hkd500 1000=1sec │
│ /fhf │ F1 help file NONE │ /fhf"f1.dat" │
└──────┴────────────────────────────────────────────┴─────────────────────┘
BTX SWITCH EXPLANATIONS
Each switch uses this format to define what it does, what to expect
as a default, what kind of range it has and so on. What follows is
addition information and tips on how and when to use the switch.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ │ │ │ │
└───╥────┴───╥────┴────╥────┴───╥────────────────────────────────────┘
║ ║ ║ ╚═══What does the switch do?
║ ║ ╚══What BTX will use unless switched otherwise
║ ╚════What type of values/characters follow the switch
╚═════How the switch should appear - without arguments
On some of the defaults, you may see 30/112. This means that color
monitors will use color attribute 30, monochrome will receive 112.
If you would like to see more examples, be sure to run SAMPLES.COM
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /* │ 1..600 │ OFF │ Save screen after x secs │
└────────┴────────┴─────────┴────────────────────────────────────────┘
To keep you monitor is showroom condition, use the /* switch to
blank the screen after a specified number of seconds of keyboard
inactivity. (Of course, the best way to keep your monitor in showroom
condition is to turn it off when not in use!)
SAMPLE
BTX This1 That2 The_Other3 /*30
This will clear the screen after 30 seconds. A cursor will then
begin bouncing around the screen to let you know that all is well.
To redisplay the menu, press any key. Every 30 seconds, the same
bouncing cursor will reappear.
NOTE: Screen save will not work when your use the /w switch
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /? │ file │ OFF │ Specify external help file │
└────────┴────────┴─────────┴────────────────────────────────────────┘
DOS only allows 128 characters on the command line. This switch
allows you to place help lines of up to 79 characters for each
of the menu items. Here's how it works:
Create a text file that contains one line of explanation for each of
your menu items. When BTX loads, each line will be displayed when the
menu pointer is resting on that item.
SAMPLE
BTX WordW SpreadsheetS Mean18M /?"\HELP.DAT"
If HELP.DAT were created and saved in the root directory as...
Edit/print a letterC
Crunch some numbersC
Play some golfC
Each time the up/down arrow key was pressed, one of these lines
would appear on the 25th line of the BTX screen. Help lines can
be justified by ended each line with a character code of L,R or C.
In the above example, all lines would be centered.
For more advanced help, see switch /fhf
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /a │ 0..15 │ 18 │ Screen flood color attribute │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Flooding means filling the screen with the same character. By
default, BTX "floods" with ASCII character #178, which is a ▓. You
can flood with whatever you want, including a space, which effectively
leaves you with a blank background.
The default flood color is green on blue. This sounds nasty but with
character attribute 178, it's actually very easy on the eyes.
SAMPLE
BTX One1 Two2 Three3 /a12 (floods the screen RED)
The look of the flood is also based on what character is used. For
example, you could really get radical and do a:
BTX One1 Two2 Three3 /a77 /f220
This would be an excellent menu to keep others away from your monitor.
See /f to set flood character. Try using RGB.EXE and FLD.EXE for
some more help when designing menus.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /ba │ 0..15 │ 30/112 │ Color attribute of the menu border │
└────────┴────────┴─────────┴────────────────────────────────────────┘
All menus have borders. By default, the menu border color is the
same as the normal (unhighlighted) text. To change this use the
/ba switch.
SAMPLE
BTX OneO TwoT tHreeH /ba19 /bt2
This would give you cyan on blue - which would be darn acceptable
on a color system. However, a monochrome might not look as nice
because the normal text is set to 112 (reverse video). Anytime
switches are used to adjust color, be aware that you are explicitly
setting them. In other words, make sure that menus are tested on
both mono and color systems if they will be used on both.
By default, BTX will choose colors that are reasonably agreeable
on both color and monochrome monitors.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /bt │ 1..6 │ 5 │ Type of border for the menu │
└────────┴────────┴─────────┴────────────────────────────────────────┘
1 ┌─┐ 2 ╔═╗ 3 ╓─╖ 4 ╒═╕ 5 none 6 █▄▄▄▄█
└─┘ ╚═╝ ╙─╜ ╘═╛ █ █
█▄▄▄▄█
Simple enough, this defines which box drawing characters are used
to surround your menu choices.
SAMPLE
BTX OneO TwoT tHreeH /bt3
This will produce a menu that uses single-top, double-side border
characters.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /c │ 1..127 │ 23/112 │ Color attribute of normal text │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Normal text are the items in a menu that are not currently selected.
In other words, a 5 item menu will always have 4 items that use
the normal color attribute.
By default, color monitors will use (23) lightgray on blue, monochrome
will see black on lightgray (112).
See switch /t to change color attribute of the highlighted item.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│/config │ NONE │ N/A │ Installs BTX for registered users │
└────────┴────────┴─────────┴────────────────────────────────────────┘
If you have registered, you are invited to use the /config option.
Before you do, you should create a text file that is 9 lines by 60
characters wide.
SAMPLE install file:
For more information about SCUDBLASTERS
please contact me at:
PO BOX 512 * Your City, ST 72382
Telephone support is available to all
registered users. Free free to call
anytime to gripe.
Wow!
Remember, the file must be pure text that has less than 10 lines,
and less than a max of 60 characters. Any characters that extend
beyond column 60 will be ignored.
Also, decide on what header and footer defaults you would like BTX
to use each time you run it. This allows you to bypass having to
use the /hd and /sf switches in the command line.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /d │ 0..200 │ 0 │ Delay used for screen clearing on exit│
└────────┴────────┴─────────┴────────────────────────────────────────┘
When using any of the /e options, you may also wish to include a
/d parameter to adjust the speed with which the screen clears.
SAMPLE
BTX This1 That2 The_Other3 /e1 /d5
or
BTX this1 that2 eXitX /e8 /d5 ( fast dissolve )
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /e │ 0..9 │ 0 │ How the screen is cleared │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Normally, when an item is selected and BTX exits back to DOS, the
screen is cleared. The default is to clear it immediately and quickly.
However, should you feel that your menus require some variety, try
one of these other methods for screen clearing.
┌SWITCH ACTION────────────────────────────────────────────┐
││ 1 starts at center and grows outward │
││ 2 starts at left and right edges and moves inward │
││ 3 opposite of e2 │
││ 4 starts and top and clears down │
││ 5 opposite of 4 │
││ 6 clears from left to right │
││ 7 opposite of 6 │
││ 8 dissolve │
││ 9 does_nothing (no clear screen) │
└┴─────────────────────────────────────────────────────────┘
Try running EXITS.BAT from the SAMPLES.COM collection.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /esc │ NONE │ OFF │ Allows ESC to exit menus │
└────────┴────────┴─────────┴────────────────────────────────────────┘
By default, the ESC key is turned off. This means that the user
must hit <CR> or press a valid hot key to exit. Including this
will return an errorlevel of 0 when ESC is pressed. Be sure that
your batch file is set up to catch this. See SIMPLE.BAT for an
example of how ESC is handled.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /f │ 32..255│ 178 │ Define the background for the menu │
└────────┴────────┴─────────┴────────────────────────────────────────┘
In order to produce a shadow effect, there must be a non-black
background. Just before the menu appears, 2000 ░'s will be
written. If you don't like this one, you can specify yer own.
Should you grow tired of flooded backgrounds, use 32.
SAMPLE
BTX One1 Two2 Three3 /f32 (blanks the screen)
BTX One1 Two2 Three3 /f219 (fills screen with █)
Also see the /a switch to control background color. Use RGB.EXE to
explore the character/color possibilities. e.g., RGB 178 will show
you what character 178 looks like in all possible combinations.
Also, run FLD.EXE to test flood character/attribute combinations.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /fa │ 1..127 │ 112 │ Color attribute of the bottom line │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Sets the color of the line that appears at the very bottom of the
screen. Normally, this line says something like:
Use the Up/Down arrow keys to select. Press F1 for help
If you would prefer to say something else:
BTX OneO TwoT tHreeH /sfScream_like_a_chicken_to_exitC
This will instruct the user on the proper exiting technique. Remember
to connect words in the message with underscores. This line will be
centered because it was ended with a upper case C. If you want it
left justified, end the message normally. To right justify, end it
with an upper case R.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /fhf │ file │ OFF │ F1 help file name │
└────────┴────────┴─────────┴────────────────────────────────────────┘
If you want to offer F1 context sensitive help, you will use this
switch. This switch is followed by a file name explicitly telling
where the help information is stored.
SAMPLE
BTX OneO TwoT tHreeH /fhf"D:\F1.DAT"
In this example, you would create a text file called F1.DAT that
must reside in the root directory of the D: drive. (*This* one must
reside there - you can put your data files wherever you want!)
This data file may have up to 10 lines by 60 characters for each menu
item. Here's what F1.DAT might look like:
@1 This line marks the start of what is displayed for item #1
If you select this option, you will be loading a
program that does this, that and the other thing.
Be careful never to load this program on Tuesdays
or after having consumed more than one beer.
----------------------------------
Press ESC to continue
@2 Ok, this is the info for item #2
* * * * * * * * * * * * * * * * * *
Sorry, no help is available for Two
* * * * * * * * * * * * * * * * * *
Press ESC to continue
@3
This option will permit you to do all sorts
of things that you never dreamed possible. Make
sure that you are alone when you select this
option. Have a real nice day.
@ lines tell BTX that the following lines are for that option.
Everything beyond the @ code is ignored so DO NOT put information
on that line that you want displayed to the user.
Blank lines are also ignored so you will have to do something creative
if you want space in your F1 help messages.
Any key pressed during F1 help message will remove the box and
restore the menu.
TIP: If you have a RAM drive, put this file there! Access on a
hard drive is normally very fast. However, using a RAM drive will
ensure instantaneous response.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /fm │ 1..127 │ 112 │ Color attribute of F1 messages │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Sets the color for the messages that are displayed via /fhf or
the generic help message that is installed via the /config switch.
On these windows, border and text are the same. Border type is single
box characters.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /ha │ 1..127 │ 112 │ Color attribute of header line │
└────────┴────────┴─────────┴────────────────────────────────────────┘
The header is the first line on the screen. It runs from column 1 to 80.
This switch sets the color.
SAMPLE
BTX blah1 blah2 blah3 /ha78
This would set the color to yellow on red. Run RGB.EXE to see what
other color attribute values produce.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /hd │ mesg │ NONE │ Displays a message on the header line │
└────────┴────────┴─────────┴────────────────────────────────────────┘
If you omit this item, your menu will appear with a generic title that
will give me credit for writing BTX. To include your own, use the /hd
switch followed by the text that you wish to display. Remember that
words must be connected with an underscore.
SAMPLE
BTX OneO TwoT /hHello_World!
See the /config switch if you are a registered user!
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /hka │ 1..127 │ 31/112 │ Color attribute of the hot keys │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Choose whatever color you feel is most attractive for highlighting
a single letter in each menu item.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /hkd │ 0..1000│ 300 │ Msecs of delay after hot key action │
└────────┴────────┴─────────┴────────────────────────────────────────┘
When hot keys are used, the menu bar moves to that item, then
exits. The /hkd is the switch to use if you want more time for your
users to see what they have pressed.
SAMPLE
BTX OneO TwoT /hkd2000
In this example, the menu pointer will move to that item, then wait
2 seconds before exiting. If you press the wrong hot key, this will
allow you to see that you have made a mistake. This does not give you
the opportunity to correct it before exiting.
See /hkp (hot key pause) if you are building menus that require
absolute user confirmation before exiting.
NOTE: Do not use this with /hkp
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /hkp │ NONE │ OFF │ Waits for <CR> before exiting │
└────────┴────────┴─────────┴────────────────────────────────────────┘
This kind of defeats the hot key purpose but then again, this might
be useful when making selections that do serious things.
SAMPLE
BTX format_drive_C:C erase_All_filesA delete_boot_RecordR /hkp
When the user hits one of the hot keys, the menu bar will move
to that item but will wait for <CR> to be pressed before exiting.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /info │ NONE │ N/A │ Shows some info about BTX │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Use this from the DOS prompt to get some more information about BTX.
You will see what version number of BTX you are running along with
my current mailing address. In addition, this screen will display
your registration number. Registered copies may be distributed to
your end users but SHOULD NOT be intentionally circulated to BBSs
and disk vendors.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /m │ file │ OFF │ Read menu items from a text file │
└────────┴────────┴─────────┴────────────────────────────────────────┘
DOS only allows 128 characters on the command line. This switch
allows you to place your menu items in a text file rather than
including them in the command line. Here's how it works:
Create a text file that contain the lines for each of your menu
items. Remember to end each line with the hot key that you want
to activate that menu item. Now save the file and tell BTX
where to find it.
SAMPLE
BTX /m"D:BAT.DAT" (load menu items from file D:BAT.DAT)
When defining a file name with a switch, the leading " must be used.
The trailing " may be omitted.
You must specify up to 10 items in a single menu, each one being
up to 60 characters in length. When creating your data file, you
should begin on line 1, left-justifying each. If you want your
menu items centered, you should use the /mtj switch to move them
left or right.
If you have a RAM drive, you should use it here to expedite BTX
loading.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /mti │ mesg │ OFF │ Inserts menu title │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Puts some words directly above the menu items. This gives users a
quick confirmation when building systems with similar looking
menus.
SAMPLE
BTX Word_processorW SpreadsheetS DatabaseD eXitX /mtTOP_MENU /bt1
yields:
┌────TOP MENU─────┐
│ Word processor │
│ Spreadsheet │
│ Database │
│ eXit │
└─────────────────┘
Be careful not to specify a title that would exceed the width of
the menu box. If you do this, BTX will begin to randomly erase
files from any available hard drives. (I just wanted to see if
you were paying attention here.)
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /mtj │ Char │ C │ Justifies menu items in window │
└────────┴────────┴─────────┴────────────────────────────────────────┘
By default, the menu items will appear centered in the menu box.
Some menus look strange with this format. For example:
BTX [A]-blahA [B]-blahB [C]-blahC /mtjL
would look much better if it were left-justified. Your other
option is R, which I would bet will never be used.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /ncc │ NONE │ OFF │ Turns Ctrl-C exiting OFF │
└────────┴────────┴─────────┴────────────────────────────────────────┘
By default, BTX menus can be terminated with a Ctrl-Break. If you
do not want your users messing with DOS prompts, include this
switch to keep them from jumping overboard.
SAMPLE
BTX 1-blah1 2-blah2 3-blah3 /ncc
Only way to exit now is via a valid menu entry.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /o │ 1..10 │ OFF │ Selects this item on autoexit │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Let's say that you want your menu to appear in an autoexec.bat
file but you can't always be sure that someone will be there to
make a decision. In this case, you can have BTX select an option
after a specified number of seconds. If the /o switch is not
included, BTX will auto-select item 1.
SAMPLE
BTX One1 Two2 Three3 /w10 (wait 10 secs, then enter One)
BTX One1 Two2 Three3 /w5 /o2 (wait 5 secs, then enter Two)
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /p? │ code │ OFF │ Requires this password to exit menu │
└────────┴────────┴─────────┴────────────────────────────────────────┘
When the /p? switch is used Ctrl-Breaking is turned OFF. (Ctrl-Break
and Ctrl-C will no longer halt the menu.) The /p? switch should be
followed by a 4 character, non-case sensitive string.
e.g. BTX One1 Two2 Three3 /p?ASDF
When any of the menu options are selected, a password prompt will
appear on the 25th line. ESC is also protected unless the /esc
switch is included. Remember to give your user a way out should
they fall into a password protected menu.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /pb │ 32..255│ 32 │ Characters used to justify menu items │
└────────┴────────┴─────────┴────────────────────────────────────────┘
This is the character (ASCII decimal) that is used to justify menu
items. Normally, you will want your menus justified with a space,
which is the default. However, you can experiment to see what looks
good.
SAMPLE
BTX Word_processorW SpreadsheetS DatabaseD eXitX /pd250
produces:
┌────MAIN MENU────┐
│ ·Word processor·│
│ ··Spreadsheet···│
│ ···Database·····│
│ ·····eXit·······│
└─────────────────┘
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /s │ 50..255│ 0 │ Make some noise when the screen clears│
└────────┴────────┴─────────┴────────────────────────────────────────┘
If you are using the /e1 exit switch, including /s will produce a
noise where the frequency increases quickly. It is suggested that you
use this conservatively if the menu will be used frequently.
SAMPLE
BTX One1 Two2 Three3 /e1 /s100 (makes a noise on exit)
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /sba │ 1..127 │ 75/112 │ Color attribute of the stat boxes │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Stat boxes are yellow on red or black on light gray. If you would
prefer something else, use /sba as required.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /sf │ mesg │ NONE │ Insert a message into bottom line │
└────────┴────────┴─────────┴────────────────────────────────────────┘
This posts a message on the bottom line. Usually it tells your users
to press certain keys to select menu items. Messages can be justified
by ending the message with a C,L or R.
The default is message is:
' or hotkeys select F1 help ESC to exit'
SAMPLE
BTX Word_processorW SpreadsheetS DatabaseD eXitX /sfHello_there!C
With this, Hello there! would be centered in line 25.
Registered users, can use the /config switch to permanently set the
footer message.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /sha │ 1..127 │ 3 │ Color attribute of shadow character │
└────────┴────────┴─────────┴────────────────────────────────────────┘
To give the illusion of shadow, a character is placed around two
sides of the menu when the /shdw switch is used. By default, this
is character 176 (░) in gray. If you would like to change how the
shadow appears, try adjusting these using the /sha and /shc switches.
SAMPLE
BTX One1 Two2 Three3 /shc219 /sha7
Uses character 219 (█), colors it light gray. As a guideline, shadows
colors should be darker than the flooded background.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /shc │ 32..127│ 176 │ Define shadow character │
└────────┴────────┴─────────┴────────────────────────────────────────┘
You decide which character the menu shadow casts. See /sha for more.
SAMPLE
BTX OneO TwoT /shc32 /shdw
would produce a menu that uses space to create the shadow.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /shdw │ NONE │ OFF │ Turns ON the shadow character │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Before using /sha and /shc, you must activate the shadow feature by
including the /shdw switch.
SAMPLE
BTX OneO TwoT /shdw
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /sm │ 1..10 │ 2 │ Controls left and right menu margins │
└────────┴────────┴─────────┴────────────────────────────────────────┘
If have real short menu items, you can increase the width of the
menu box by increasing the margins.
BEFORE /sm... AFTER /sm...
BTX A:A B:B C:C BTX A:A B:B C:C /sm8
┌──────┐ ┌─────────────────┐
│ A: │ │ A: │
│ B: │ │ B: │
│ C: │ │ C: │
│ eXit │ │ eXit │
└──────┘ └─────────────────┘
This is particularly useful when your menu items are narrow but you
want to include a decent menu title using the /mti switch.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /st │ 1..4 │ OFF │ Shows some stats │
└────────┴────────┴─────────┴────────────────────────────────────────┘
If you would like to show your user drive space or RAM available,
use the /st switch.
ARGUMENT DISPLAY
┌─────┬────────────────────────────────────┐
│ 1 │ RAM available before loading BTX │
│ 2 │ Space available in default drive │
│ 3 │ Both 1 and 2. │
│ 4 │ Both 1 and 2 in the same box │
└─────┴────────────────────────────────────┘
If your menus are real long, you should use 1, 2 or 3. This
provides better menu symmetry. Be aware that this will degrade menu
performance on floppy based menus.
SAMPLE
BTX OneO TwoT /st4
yields:
┌───────┐
│ One │
│ Two │
└───────┘
┌─────────────────────────────────────────────┐
│ RAM 640K installed, 425K available (66%) │
│ DRIVE C: has 13.2 Megs available (20%) │
└─────────────────────────────────────────────┘
Remember, the RAM available is the amount of RAM that WILL BE available
when BTX loads your application.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /sw │ 1..2 │ NONE │ Shows a help screen of switches │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Use this from the DOS line if you need to reference the switch list.
SAMPLE
BTX /sw1 or BTX /sw2
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /t │ 1..127 │ 112/15 │ Color attribute of menu bar │
└────────┴────────┴─────────┴────────────────────────────────────────┘
The attribute of the menu bar represents the colors. This is
menu pointer that moves each time the up/down arrow keys are
pressed, the one that will be selected when they hit <CR>.
For both mono and color systems, the default is 15 which means
white on black. To test any of the color combinations, you can
use the utility called RGB.EXE to display 0-127 attributes as
well as any ASCII character.
e.g. RGB 65 will show you what A looks like in all possible
color combinations.
Be careful when using this. Sometimes a /t attribute on a
color monitor will look fine - but will be invisible on monochrome.
There must be a sharp contract between this switch and the /c switch.
See /c for information on setting normal text colors
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /tt │ 1..16 │ 3 │ Select format for time display │
└────────┴────────┴─────────┴────────────────────────────────────────┘
When BTX loads, a clock will be displayed in the upper right corner
of the screen. The format will be HH:MM:SS. If you prefer some
other format, go for it!
1 = 13:30 6 = 1:30pm 11 = 1PM
2 = 1330 7 = 1|30pm 12 = 30min
3 = 13:30:30 8 = 1:30:30pm 13 = 30sec
4 = 13:30:30.30 9 = 1:30:30.30pm 14 = 30hsec
5 = 13h30 10 = 1PM30 15 = 13303030
16 = secs past midnite
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /~ │ 1..100 │ OFF │ Save screen using twinkle routine │
└────────┴────────┴─────────┴────────────────────────────────────────┘
This must be used in conjunction with the /* switch. If you get
tired of the bouncing rectangle, try this one.
SAMPLE
BTX One1 Two2 Three3 eXitX /*30 /~100
After 30 seconds the screen saver will be activated. Rather than
something that bounces, the screen will be removed and restored
in a rather unique fashion. The menu can be restored by pressing any
key. The /* timer then starts over until another key is pressed.
This is not the best "screen saver" but it is kind of fun to watch.
┌─SWITCH─┬ARGUMENT┬─DEFAULT─┬──FUNCTION──────────────────────────────┐
│ /w │ 1..100 │ OFF │ Selects this item after x seconds │
└────────┴────────┴─────────┴────────────────────────────────────────┘
Let's say that you want your menu to appear in an autoexec.bat
file but you can't always be sure that someone will be there to
make a selection. In this case, you can have BTX select an
option after a specified number of seconds. If the /o switch is
not included, BTX will auto-select item 1.
SAMPLE
BTX One1 Two2 Three3 /w10 (wait 10 secs, then enter One)
BTX One1 Two2 Three3 /w5 /o2 (wait 5 secs, then enter Two)
NOTE: BTW will wait /w seconds, then initiate the autoload with a 3
second abort. You will see the menu bar move to the option
3 seconds before it is launched. To abort the autoload, press
any key. If you are paying attention, you will notice that the
clock in the upper right hand corner stops when you have under
3 seconds remaining.
Therefore, if you really want to wait just 10 seconds before
loading, you would use /w7
If you abort the autoload with keypress, the /w counter will
start over!! You must make your selection within the /w time!
The BAT Chime
Each half hour, BTX will chirp to let you know that another 30 minutes
of your life is gone. The only way to deactivate this is to save the
screen or press the F1 key and not hit ESC.
BATHELPER - BH.EXE
There are two kinds of computer users. Those who know how to write
batch files and those who should learn. Regardless of the group into
which you fall, BH may be of interest to you.
Each time you develop a BTX application, you must sit down with an
editor and press hundreds of keys to get BTX running. Even if you
know precisely what you are doing, this is still a pain. For the most
part, each batch file that you write is deadly similar.
BH is a BATMEN utility that writes a high percentage of the file for
you. If you already know how to write batch files, then BH will just
save you some keystrokes. If you are learning how to write them, then
BH might be able to show you how.
To run BH, just enter it at the DOS prompt. If you have downloaded
BTX from a BBS, BH was not included. This is not some stupid scheme
to get you to register. It was not included so to keep the size of
the ZIP file as small as possible. BH has a heavy interface which
means that it's kinda large. If you need a copy of BH, you may take
it from my BBS. The name there is BATHELP.ZIP. Of course, another
way to obtain it, along with a fresh copy of BTX, would be to register!
RGB and FLD
These are two quick and dirty utilities that I tossed in to help
with menu design. Rather than having to continually run BTX to
check flood characters and screen attributes, you can try these
instead.
If you enter RGB by itself, it will display numbers from 1 to 127
showing you each color attribute. If you would like to see a
specific character using the same chart, enter the value after
the RGB. For example, RGB 178 will show you what ▓ looks like
using all color attributes. You can find ASCII tables in the
back of every computer book ever printed.
FLD, which stands for FLOOD, will flood a portion of the screen
just as BTX does. RGB does not give you the full effect because
only one attribute of each is displayed. Suppose that you were
considering character 177 using color 78. All you need do is run
FLD 177 78 to see what that flood combination will look like in BTX.
FLD <CR> reminds you of the format.
EDITING BATCH FILES
If you are going to be using BTX, you will need a text editor.
Should be in the market for one, I recommend Qedit from Sammy Mitchell.
You can obtain a shareware copy from lots of different boards or you
might order one from Sizzleware at (800) 356-2697 or The Software Labs
at (800) 359-9998. They've got fresh copies and they don't slam ya
on disk prices.
Included on this disk is a copy of TED. This is a compact text editor
which is fine for editing batch files. It loads fast and doesnt take
up a bug chunck of drive space.
For more examples, run SAMPLES.COM
REGISTRATION
If you would like to get the most recent version of BTX and be able
to /config your data into the EXE file, complete ORDER.FRM.
When you register, you will be able to configure BTX to carry your
specific message. For example, you could rename the program to
MENU.EXE, then configure the F1 help screen and header lines to read:
YER PROGRAM (c) 1991 by Yer Name
This means that no one but you and I will know that you're customers
are running BTX. This if fine with me. I'm not worried about the
copyright implications. But just do me this favor. Once BTX has been,
configured with your name, please DO NOT intentionally distribute this
to BBSs and disk vendors.
If you have received a copy of BTX that has already been configured,
please do a BTX /info and send me the registration number. I will
send you a fresh copy with a registration key at no charge.
NOTES as of 01-30-91
If you find something that does not work, (yes, a bug) please report
it to me! However, if the above date is more than a few months old,
there's a good chance that the program has been updated. In this
case, download a fresh copy from my BBS at (313) 662-9160 or write to
the address given in the ORDER.FRM file.
If there are any more feature that you would like to see implemented,
please send me your suggestions. I will include almost any suggestion
provided that the code overhead is not too extensive.
SHAREWARE UPDATE
You may obtain fresh copies of BTX via EXEC-PC in Elm Grove, Wisconsin.
I will upload even minor changes there within a week of release.
CHANGE SUMMARY
~~~~~~~~~~~~~~
On version numbers: X.yz where
X - Major change. Extensive additions/enhancements
y - adds at least one new significant feature
z - updated to correct a bug
1.01 If you made this call
BTX /m"\games.dat" /mtiGAMES_MENU
BTX did nothing because there were no menu items on the
command line.