home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
batutl
/
makemenu.arc
/
READ.ME
< prev
next >
Wrap
Text File
|
1989-05-09
|
12KB
|
280 lines
This is a subset of the EasyTool Utilities that contains all the utilities
you need to run MAKEMENU.BAT. The following describes how to use MAKEMENU.
It is excerpted from the EasyTool Utilities User Guide.
We then tell you more about the EasyTool Utilities, including how to get your
complete set.
=============================================================================
MAKEMENU Batch File
Purpose:
To create a batch file that provides a menu of commands.
Applications:
Used to create a batch file that displays text within a box,
centered on the screen.
Used to create multi-level menu systems.
Usage:
MAKEMENU name-of-menu
For example, "MAKEMENU CLEANUP" would let you create a menu batch
file named "CLEANUP.BAT".
Name-of-menu must not be the same as the name of any existing
program, batch file, or DOS command, since MAKEMENU will create
a batch file with the name "name-of-menu.BAT".
HOW THE MENU THAT YOU CREATE WORKS:
MAKEMENU asks you questions to create a menu. The menu is a
batch file that gives you choices (options) of what to do. When
you press the appropriate key, the menu does what you chose. It
then asks you to press any key to return to the main screen of
choices.
Although you can always exit from your menu by pressing Ctrl-C,
you'll probably want to specify a key to press to exit.
MAKEMENU asks you to specify:
a) A descriptive name for the menu (for example "Main Menu"):
The descriptive name that you specify will be appended to the
phrase "Press any key to return to ". The resulting phrase will
be shown whenever you are returning to the menu's main screen, to
help re-orient you. For example, suppose you specify "Clean-up
Menu" as your brief description. Whenever you have executed a
choice on the menu, and you are about to return to the menu,
"Press any key to return to Clean-up Menu..." will appear on the
screen.
b) The menu's text:
This is normally a menu title, followed by a list of choices and
instructions. For example:
C L E A N - U P M E N U
Press: D for directory listing
E to erase a set of files
X to exit
Your choice:
MAKEMENU draws a box around the text you specify and centers it
on the screen. The cursor will be positioned after the text,
within the box.
You can create your menu's screen with a word processor in non-
document mode or with a text editor, if you prefer that to typing
it at the keyboard: just put the text into a file named "name-
of-menu.MNU" (for example, "CLEANUP.MNU"). When you type your
text at the keyboard, MAKEMENU creates just such a file. In the
future, when you want to revise your menu, you can modify this
file with a text editor before starting MAKEMENU.
After you've specified how the screen appears, MAKEMENU asks you
to specify the following until you have no more options left to
specify:
c) A key that chooses an option. You simply press the key. In a
moment it will appear on the screen. Some keys, such as "Page
Down", will appear as graphic characters. Others, such as the
Return key, will be spelled out or abbreviated.
d) what happens when you press the key. You simply type the
command line(s) that do what you want. For example, you could
enter the command line "DIR | PAGE".
Any batch file that you call (invoke) should be preceded with
"COMMAND /C" if you want execution to return to the menu batch
file when done. (See "Executing Batch Files Within Batch
Files".) This is because the command lines that you type are
directly entered into the batch file. For example, "COMMAND /C
SUBMENU" would invoke SUBMENU, which itself could be another menu
batch file. By calling menus you can create a multi-level menu
system.
You can use labels, insert comments, and do anything else allowed
in a batch file. The labels "START" and "EXIT" are automatically
included in the menu batch file. To specify returning to the
menu's main screen, enter the command line "GOTO START". To
specify exiting from the menu, enter "GOTO EXIT".
You can make a menu that simply shows text on the screen and then
exits, by specifying menu text but not specifying any options.
After you have completely specified the menu, MAKEMENU
automatically invokes it so that you can test what you've just
created.
MODIFYING YOUR MENU:
When you are done with MAKEMENU, you can modify the lines in the
menu batch file that you have created, just like any other batch
file. Modify the PUT commands to change the menu's colors, to
change the screen position of the menu or of the cursor, etc.
(Type "PUT ?" for instructions on using PUT.)
You may even prefer to use MAKEMENU to simply create a skeleton
BAT file, and fill in the details later. For example, you might
use MAKEMENU to create a menu with options but for each option
simply execute "ECHO OPTION [#] CHOSEN". Then later you would
replace that line in the BAT file with the real command lines.
Limitations:
Descriptive name may contain up to 45 characters.
Menu text may contain up to 20 lines.
MAKEMENU will prevent you from entering certain characters such
as DOS redirection operators (<>|) in the menu name and text, and
from using those keys to choose an option. This is because DOS
would misinterpret them in the BAT file. However, the command
lines you enter may contain any characters.
===========================================================================
MAKEMENU is just one of fifty commands from the EasyTool Utilities. You
already have 14 of them, including MAKEMENU. You might want to try some of
the others.
For example, here are some command lines you might try for the X Utility:
X ECHO [S/\*]
echoes the names of all subdirectories that are immediately under the root
directory.
X TRY RD [S/\*]
removes any of the subdirectories echoed above that are empty. (TRY is
an EasyTool Utility that suppresses DOS's error message when RD, CD, or MD
fail.)
X COPY [FILE1,FILE2,FILE3,*.ARC,*.DOC] A:
is the equivelant of typing "COPY FILE1 A:" then "COPY FILE2 A:" etc.
for each of the filespecs that you list within the brackets.
X WS [*.DOC]
will put you into Wordstar with the first ".DOC" file. When you exit, you
will immediately return to Wordstar with the next ".DOC" file, and so forth
until you have gone through all ".DOC" files.
X MAKE [*.EXE,*.COM]
will MAKE all files with extention ".EXE" or ".COM".
You get the idea. . .
HOW TO EXIT
You can exit any EasyTool program by pressing Ctrl-C or the Break key.
HOW TO GET HELP
Some helpful information is available when you type the program name followed
by space and then question mark. (For example, "PUT ?" will show you some
information about the PUT program.) The complete documentation is in the
159 page User Guide, which you will receive when you register.
The complete set of EasyTool Utilities include the following commands:
access -- tells if subdirectory or file exists/can be accessed as desired
backward -- reverses sequence of lines or pages
blank -- blanks screen to help prevent burn-in
calc -- does calculations using numbers on command line or in file
case -- converts file to all upper or all lower case characters
col -- displays column-ruler across screen
colors -- shows 128 possible color combinations
decode -- puts graphic characters into file/displays ASCII values
define -- removes strings and, optionally, replaces them in file
delq -- asks whether to delete each file matching filespec(s)
demo -- demonstrates a few Utilities and how you might write a demo program
dinstall -- installs data path in certain EasyTool Utilities
echox -- copies text multiple times
ensure -- ensures that last character of file is the desired one
findat -- extracts or deletes lines from file (enhances DOS find)
get -- validates data, or lets user enter data
listcol -- prints text file listing in minimum space/multiple columns
log -- puts current date and time plus message into a log file
makebox -- creates file with graphic box around text
makemenu -- generates menus
merge -- combines already sorted files into one single sorted file
move -- moves files (replaces DOS COPY + ERASE)
movedate -- moves files into directories based on their creation date
name -- creates list of subdirectory names or file names
page -- pages through file one screenful at a time (enhances DOS MORE)
pathset -- adds to, removes, or changes order of directory in DOS path
pick -- waits for key to be struck and sets DOS ERRORLEVEL to tell which
put -- puts cursor at screen location, controls colors, displays text
qx -- used to quickly exit a BAT file (optionally displays message)
random -- generates random numbers between 0.0 and 1.0
randomiz -- puts numbers in random order
reformat -- like a "mailmerge" program, but allows file to be "free-format"
retab -- inserts, deletes, or changes tab positions in file
showerr -- shows the DOS ERRORLEVEL
showstat -- shows file attributes and sets DOS ERRORLEVEL to indicate them
siz -- subtotals file sizes
space -- calculates disk space occupied by a set of files
split -- separates lines of file into different result-files, by rules
sum -- sums (totals) a column of numbers
text -- converts file into standard ASCII text
tim -- shows current or file-creation date and time, in a.m./p.m. terms
try -- makes, removes, or changes to directory without error message
uniq -- removes lines from file that are identical to previous line
wait -- pauses until key is struck or time has elapsed
whatis -- documents or looks-up meaning of word
width -- shows width of each line in file
wordwrap -- fits text into specified column width or isolates words
x -- gives extended wildcard capability to any program
xtrbytes -- extracts or deletes sections of a file
xtrchars -- extracts or rearranges characters in text lines
xtrline -- extracts or deletes lines from file
zapbyte -- shortens or lengthens a file
===========================================================================
The EasyTool Utilities are a set of programs that make DOS more powerful and
flexible. You can use them individually or combine them to invent your own
commands. They are extentions to DOS's batch language. None are memory
resident. In order to use them you need to know the concepts of
subdirectories, paths, and wildcards.
Developers and PC support staff use the EasyTool Utilities:
* to create install programs, demo programs, and menu systems
* to generate test data
* to print program listings in minimum space for maximum comprehension
* to make their batch files more "idiot-proof" and sophisticated.
You can try 29 Easytool Utilities for free!
Or better yet, register and receive:
1) all 50 EasyTool Utilities
2) User Guide that tutors you and reveals the Utilities' secrets.
(It includes a Reference Manual that is essential for serious users.)
3) license for non-trial use, including the right to distribute
the Utilities for non-trial runtime use. For example, you
could create a batch command of your own using some of the
utilities and distribute it without paying royalties.
Registration is $15 for individuals, $44 for small institutions/professionals,
large sites by arrangement.
Please specify if you want your software on a 3.5" instead of 5.25" diskette.
Please add $5 for postage and handling ($10 outside U.S.), and send to:
EasyTools, POB 33-MRA, Crosswicks, N.J. 08515.