Dec 172017
 
A nice program that makes delayed program execution easy in batch files.
File XBAT1.ZIP from The Programmer’s Corner in
Category Batch Files
A nice program that makes delayed program execution easy in batch files.
File Name File Size Zip Size Zip Type
XBAT.DOC 10209 3247 deflated
XBAT.EXE 18000 9238 deflated

Download File XBAT1.ZIP Here

Contents of the XBAT.DOC file




XBAT Batch File Extension Utility 1.0
Documentation
Copyright 1989 Mark A. Albrecht
All Rights Resrved




D I S C L A I M E R

The author, Mark A. Albrecht, makes no warranties expressed
or implied as to the quality or performance of this program,
nor its fitness for a particular purpose. The author will
not be held liable for any direct, indirect, incidental, or
consequential damages resulting from the use of this program.
YOUR USE OF THIS PROGRAM CONSTITUTES YOUR AGREEMENT TO THIS
DISCLAIMER and your release of the author from any form of
liability or litigation.




DESCRIPTION:


XBAT is a utility designed to extend the capabilities of DOS
batch files. XBAT provides two simple functions: the ability to
store keystrokes in a batch file and have them passed to the
application upon execution, and the ability to store an optional
execution date and time in the batch file.

FEATURES:


MENU DRIVEN - commands written by XBAT into the batch file are
entered by the user via intuitive menus;

COMPATIBLE - works on any IBM (tm) close-compatible;

SMALL - requires approximately 20K RAM.



SYSTEM REQUIREMENTS:


1. PC/MSDOS 3.0 or later (PCDOS Copyright IBM Inc.. MSDOS Copyright
Microsoft Inc.)

2. IBM compatible.



SETUP:


1. Copy XBAT into the (sub)directory in which the application to be
executed resides. Or, copy XBAT into one of the (sub)directories
included in your DOS "PATH" environment variable.

2. Enter the command "FILES 20" into your "CONFIG.SYS" file.



CREATING BATCH FILES:


Run "XBAT /M". The "/M" argument instructs XBAT that you wish
to make a batch file. Once inside, XBAT will display a prompt asking
you to press a number key 1-5, which correspond to each of the command
arguments XBAT will write to the batch file. Following are instructions
for each of the five choices:

Menu Choice:


1. BATCH FILE NAME....... Enter the filename you wish to give the
batch file being created. Include the
".BAT" extension.

2. FILE TO BE EXECUTED... Enter the name of the application to
be executed by the batch file being
created. Include the filename exten-
sion.

3. TIME TO BE EXECUTED... If you wish to have the batch file delay
execution of the application until a
specific time and date, enter the specific
hour (in 24 hour military format), minute,
and second. If you do not wish execution
to be delayed, skip to choice 5 below.

4. DATE TO BE EXECUTED... If you wish to have the batch file delay
execution of the application until a
specific time and date, enter the month,
day, and year. If you do not wish execu-
tion to be delayed, skip to choice 5
below.


5. KEYBOARD SEQUENCE..... A prompt wil be displayed asking you to
press a number key 1-6. If you wish to
pass a sequence of keyboard input to the
application (e.g., the keyboard combina-
tion "Alt-D" could be passed to your comm
program to call up it's dialing directory
automatically), then press the "1" key and
you will be prompted for the first key
of the sequence. Press the actual key you
wish to have passed. Up to six keys may
be passed to the application, and they
will be passed in the order entered. If
you do not wish to have any keys passed,
press RETURN to re-display the main menu.

At the main menu, press RETURN, and a prompt will be displayed
asking if you want to "Write batch file to disk? [Y/n]". Press
"Y" or RETURN to write the batch file, or "N" to abort. That's
all there is to it!



RUNNING BATCH FILES:


Run the batch file created by XBAT as you would any other batch
file.
If you wish to pass commandline arguments from the batch file
to the application, enter them manually into the batch file, in the
remaining white space following the executable file's name. I.e., the
batch file could be edited to add the "[commandline arguments]" in the
following example.

XBAT #000000#000000#F8192#C#C#C#C#C#NAME.COM [commandline arguments]



OPERATION:


Here's how XBAT works:

The parameters you enter inside of XBAT are written to the batch
file as arguments, separated by the "#" as a delimeter. Here's a rough
diagram of the format:


XBAT.EXE #183000#061589#C13#F8192#C#C#C#C#FOO.EXE ....................

EXECUTABLE COMMANDLINE
KEY6: undefined THE USER

KEY5: undefined MAY ENTER
KEY4: undefined MANUALLY
KEY3: undefined
KEY2: F)unction key 8192 = Alt-D
KEY1: C)haracter key 13 = Carriage Return
DATE: in this example--June 15, '89
XBAT TIME: in this example--18 hrs, 30 mins, and 0 secs


When XBAT is called from this example batch file, XBAT sees that a
valid TIME has been entered along with a valid DATE (both must be
present to delay execution), so it loops until the actual system
date and time of your computer matches these values. If no time
OR no date is entered when creating the batch file, execution will
not be delayed. It next sees that, of the six possible KEYboard
entries, the first two contain valid values. It converts the text
representations of the key's ASCII numeric values to integer, and
cues them into the keyboard buffer, which the EXECUTABLE program it
calls will read just as if you had entered them once inside the
called application.
Someone is bound to ask me why I didn't provide the capability
of entering the COMMANDLINE within the XBAT utility itself, instead
of forcing the user to enter it manually. It's because there is no
way for me to guess what keyboard sequence you will enter. If you
enter six Ctrl-Home keys, for example, there will be only a few
spaces left on the commandline within the batch, because DOS imposes
an 80 character commandline length limit.



HISTORY:


Version

1.0 - First release (obviously).



LICENCE:


Use of XBAT is not free. I do not want you to send me anything,
but your licence to use XBAT beyond a reasonable trial period is
conditioned upon your donation of $5-$10 to the charitable organization
of your choice. One of many such organizations I heartily recommend is
PETA: People for the Ethical Treatment of Animals.
Your fulfillment of this condition will be deeply appreciated.



NEW RELEASES:


New releases of XBAT may be found on the following bulletin board:

NightHawk BBS
(319)338-3683
Sysop: Andy Flatt


Messages may be left for the author on the above-mentioned BBS, or
by mail:

Mark Albrecht
P.O. Box 2064
Sioux City, IA 51104



 December 17, 2017  Add comments

Leave a Reply