home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
batch
/
keyline.arj
/
KEYLINE.DOC
next >
Wrap
Text File
|
1991-08-17
|
2KB
|
49 lines
From the DOS prompt :
drive:\path\keyline <batch file>/<dos command>/<prompt string>
This program creates a one line batch file <batch file>, which must
contain the extension ".bat", to capture and act on keyboard input to
allow the operator to control batch files. Please use the forward
slash "/" to seperate the strings, otherwise a file creation error
will occur. It may be used at will in the prompt string as the first
two occurances are the significant ones for program control.
The entered string is limited to, with the <dos command>, to a total
length of 255 bytes. The program prevents the output string from
exceeding this length.
Exiting.
The program exits with the following errorlevels:-
0 - Program terminated normally.
1 - Command tail error.
(Sounds console bell once.)
2 - New batch file not created for some reason.
(Soumds console bell twice.)
Usage.
This program must be called from within a batch file and followed by
a line which calls the created <batch file> file, but not before any
errorlevel trapping is done to catch errors produced by this program.
A sample batch file might look like this (<drive:\path\> is assumed to
be current directory, so excluded from sample):
....
....
keyline keydir.bat/dir/Enter directory :
rem ^ space here not compulsory.
if errorlevel 1 goto CALLPASS
rem errorlevel 1 checking will also trap level 2 errors.
call keydir
rem use of the "call" dos command is compulsory unless you
rem want your batch file to terminate after execution.
:CALLPASS
.....
.....
Do not use a batch file called "keyline" unless the batch file is
operated from a different directory to the program "keyline".