home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
UT
/
UT214.ZIP
/
SEBFU40.LZH
/
SEBFU.DOC
< prev
next >
Wrap
Text File
|
1991-09-27
|
42KB
|
1,171 lines
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
SEBFU is a series (over 80) of utilities to enhance the use of
batch files. SEBFU, in addition to enhancing the DOS batch file
capability, also offers many utilities which will aid the novice,
intermediate and advanced user.
Registering SEBFU, has several advantages over registering these
utilities separately.
1) Price ....... All utilities, if ordered separately
would cost your $113.50, registering SEBFU as a package is only
$19.95, you save over $90 !
2) You get enhanced versions of many utilities, plus
several additional utilities (see ORDSEBFU.DOC for details).
3) You will be supporting the Shareware process, to keep
quality products arriving in the market.
4) Additional advanced usage guide and batch file
tutorial, with help for the novice and intermediate user.
If you need only a few of the SEBFU utilities, then by all means,
please register only the ones you need ! You will still be placed
on our mailing list and will be supporting the Shareware concept.
Each SEBFU utility has a separate DOC file, which has the same
name as the utility with the extension COM . These DOC files
contain all basic usage instructions, Syntax, Defaults,
Errorlevels (if supported) and any Examples which may benefit the
user. There is NO generalized explanation of batch file usage, as
that is covered in the batch file tutorial, which is sent upon
registration of SEBFU .
In this document, we will attempt to give you ideas in using
SEBFU as a set of powerful aids in developing your own batch
files, from simple uses to advanced uses.
Also, we will explain the usage of each of the utilities which
are useful from the DOS prompt or run from an application.
1
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
Many of the SEBFU utilities can be executed from the DOS command
line (called the prompt). These utilities include :
ACOLOR ....... Sets the ANSI color, ANSI.SYS must be
installed.
CGABORDR ..... Changes the border on CGA systems
CHKSUM ....... Generates Check sums for files
CURSOR ....... Sets the Cursor attributes
DLST ......... Enhanced replacement for DOS DIR cmd.
FNDHID ....... Finds hidden files on a drive
FSIZE ........ Reports the number of files, their total
size, bytes required on floppy disks and
bytes required on hard drives.
GETMCB ....... Reports on memory usage, such as TSR
location and size.
HDTYPE ....... Reports on drive types supported by the
computer Bios.
KILL0 ........ Deletes files which have zero bytes
LOG .......... A computer logging system
PAGE ......... Change video pages
PRINTC ....... Send control sequences to the printer
SV28 ......... Set EGA/VGA to 28 lines
SWPRN ........ Swap 2 printer ports
TD ........... Displays Time & Date
16 utilities, Your registered version will have even more!
Several of the above utilities will also be very useful when run
from a batch file, such as the TD and DLST utilities.
ACOLOR can be executed from a DOS prompt, but can also be very
useful when included in a batch file. Since ACOLOR and many other
SEBFU utilities require selecting the color, we suggest you print
a copy of COLOR.DOC . To do this, enter the following command
from your DOS prompt.
COPY COLOR.DOC PRN
You could, also, use any text editor to print it.
ACOLOR requires both foreground an background colors be
specified, such as :
ACOLOR 1 7
Which selects the colors of white on blue (white is 7 and 1 is
blue), note that the background color is first after the utility
name. ACOLOR.COM could also be renamed to some other name such as
COLOR.COM or C.COM .
2
ACOLOR is also very useful from a batch file, such as setting the
colors when using the DOS echo command. You could display error
messages in red (on black) as in this example.
ECHO OFF
CLS
{Function which produces an errorlevel of 1 if failure}
IF ERRORLEVEL 1 GOTO FAIL
ECHO Function ok
GOTO XIT
:FAIL
ACOLOR 0 4 {Set red on black}
ECHO Function Failed
BEEP
ACOLOR 0 7 {Back to white on black}
:XIT {End of batch file
The BEEP is one of the SEBFU utilities, and simply beeps the
speaker. This is done to draw attention to the error.
CGABORDER is a nifty utility to draw a border around video area.
The border is the area at the outer edges of the video display,
and is normally black. CGABORDR accepts all background colors as
listed in the COLOR.DOC file.
CHKSUM is a little utility which can serve as a basic virus check
system. Just generate checksums for all your EXE and COM files,
these are the ones a virus can attach to. Once the original check
sums have been generated, simply verify the check sums on a
regular basis, by using the syntax : CHKSUM fname chksum, where
'fname' is the file to check and 'chksum' the original check sum.
This mode will return an errorlevel of 1 if the match fails.
EXAMPLE:
ECHO OFF
CLS
CHKSUM CHKSUM.COM 1592
IF ERRORLEVEL 1 GOTO FAIL
GOTO XIT
:FAIL
ECHO Check sum does NOT match
BEEP
:XIT
When running some programs, which modify themselves, such as our
PWRD.COM file, you will have to run CHKSUM to get a new check
sum, when the program is modified.
EXAMPLE:
CHKSUM PWRD.COM
Generates the check sum 1526 when run the first time. After
using the new password option, you must run the above syntax
again to generate new checksum.
3
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
CURSOR is the utility to set the cursor attributes, such as blink
fast or slow, no blink, turn cursor off and to select which scan
lines to use. Scan lines are the lines (rows) used to make a
character, which is 9 for CGA systems. If you own Mono, EGA or
VGA systems, the number of scan lines is different, and you
should refer to your video system manual for the correct number.
CURSOR allows you to select the cursor start and end scan lines,
so that the cursor could look like this '_' or '─'. The standard
cursor (on CGA) is set to use scan lines 6 & 7, which looks
somewhat like the first case, but is two lines, one above the
other.
DLST is a small utility to display a five across (on CGA systems
in 80 column text mode) directory listing, without displaying
other file information like the DOS DIR command does. DLST
automatically pauses when the screen is full (switch not
required). You will be shipped an enhanced version of this, with
even more features (see DLST.DOC) when you register.
FNDHID will generate a list (which may be redirected) of all
files which are hidden (invisible). The list also contains the
other attributes, such as read only and system. The list begins
with a directory name, followed by lines (indented) of file names
and their attributes. Redirection may be used, by entering the
following command at a DOS prompt:
FNDHID>PRN
This syntax would then send the output to the printer.
FSIZE reports the size of all specified files (default is all
files), the bytes required for all specified files to fit on a
floppy disk and the bytes required to fit onto a hard drive.
FSIZE also reports the total number of files, it found, matching
the file specification specified.
GETMCB reports on memory (conventional) usage. The list will
contain any TSR name found, the size and segment where the TSR
begins. By using this, you may get some idea of how much RAM
those TSR's are using.
HDTYPE reports what hard drive types are supported by your
system. Both HDTYPE and GETMCB listings may be redirected, like
the example shown with FNDHID.
KILL0 deletes files which are empty (zero bytes). This will free
up your directory entries, and help keep DOS running faster.
4
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
LOG is a utility to maintain and track computer usage. It's basic
use is to log in and out, using the syntax LOG /I to log in and
LOG /O to log out. This syntax used from the AUTOEXEC.BAT file
will maintain a log file, which can be used to show computer
usage for IRS purposes.
PAGE can be used with the /Sp option to set the video screen to a
different page. This is handy, for instance, if you want to save
a screen for later recall as a reference.
PRINTC is your key to quickly sending print controls to the PRN
device driver. Just provide a series of decimal numbers after the
PRINTC command, and they will be issued to the PRN device.
EXAMPLE: PRINTC 27 77
Will place your printer into 12 character per inch mode (this is
the same as ESCAPE 'M' ....
SV28 simply places your EGA or VGA system into 28 line mode.
SWPRN will swap printer ports 1 and 2 (by default) or any other
printer ports supported by DOS (up to 4). This can be used, for
example prior to using PRINTC to select the second printer, to
send control strings to.
TD will display the current time and date at the current video
location, or to an optional video location. Use instead of the
DOS TIME or DATE function, to quickly display time and/or date.
When you register, an enhanced doc file will be included, showing
examples of the above uses, and some ideas for such use.
All other SEBFU utilities are really designed for use from a
batch file, even though they may work from the command line. For
example, using LOCATE from the command line doesn't really help
you much.
5
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
The balance of this document will be to give examples of using
SEBFU as a complete product (using the utilities together).
Utilities which are stand alone products will NOT be used unless
such use enhances the use of another batch file utility. Many
utilities will only be mentioned, as their usage is either simple
or there is enough documentation in the functions DOC file.
BEEP is the utility to sound the speaker for a short time.
Although this utility does NOT modify the tone (frequency), it is
by far the most widely used utility and function used. Our
version of this function offers some useful enhancements on this
type of utility. The user can specify the number of beeps, such
as:
BEEP /+3
Makes 3 short beeps . The user can also space the beeps at one
second intervals, or beep until a key stroke is detected.
EXAMPLE:
ECHO OFF
CLS
{Some application is run automatically}
ECHO Application is finished
BEEP /D /K
In this example, beeping continues at 1 second intervals until
the user presses a key. Thus, you can have the batch file start
some application which does NOT require user interaction, walk
away and simply wait for the beeping.
BIGLTR is really a utility for advertising, but can be used to
announce something such as 'HANDS OFF', 'COMPUTER', 'IN USE'.
Lets take this last usage and make an example out of it.
EXAMPLE:
ECHO OFF
CLS
{Start application as TSR (for modem stuff??)}
CLS
LOCATE 1 1
BIGLTR HANDS OFF
LOCATE 9 1
BIGLTR COMPUTER
LOCATE 17 1
BIGLTR IN USE
CR
6
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
This example will start some TSR, possibly a modem communications
system, display the message 'HANDS OFF COMPUTER IN USE' and wait
until someone presses the ENTER key.
We have also demonstrated the use of another of our utilities,
the LOCATE command. LOCATE positions the cursor. In our example,
we used it to position the cursor 3 times, prior to each use of
the BIGLTR command. This is done, since BIGLTR uses the current
cursor location to begin it's display. Finally, we end the batch
file with another of our utilities, CR, which simply waits for
the ENTER key to be pressed.
CALCYR can be useful in verifying that a real time clock is
operating correctly, or if one is even installed. The fundamental
usage is to test a selected year from that reported by DOS.
EXAMPLE:
ECHO OFF
CLS
CALCYR 1980
IF ERRORLEVEL 1 GOTO XIT
ECHO DATE is NOT set
:XIT
The above example compares the DOS derived year with 1980, and if
they match, will generate an errorlevel of 0, which the batch
file tests for. If the two years are different, then an
errorlevel will be generated which is greater than 0. If this
happens, then the line with IF ERRORLEVEL will pass control to
the label XIT, which is the end of the batch file.
CDCK, DETANSI, LIMCK, MOUSECK and XMSCK all are simple utilities
which do NOT require options (command line options) to use.
Simply enter the utility name, and an errorlevel of 1 will be
returned if the device drive exists, otherwise the errorlevel
will be 0.
EXAMPLE:
ECHO OFF
CLS
{Utility Name}
IF ERRORLEVEL 1 ECHO {Utility Name} is installed
The above is the basic usage. Alternately, the user could write
the batch file to branch on an errorlevel of 1.
7
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
CDD is a very useful utility, which can save several key strokes.
Its use can be from the DOS command line or a batch file. CDD
simply backs up some number of directories, toward the root. The
user specifies the number of directories to back up. IE... if we
enter CDD 3, we end up 3 levels back of where we were, which is
just as though we had entered CD ..\..\..
CHGLOCK is a utility which will change the state of 3 possible
lock keys (CAPS LOCK, NUM LOCK & SCROLL LOCK). Although on an AT
or 386 system the lights will change, reflecting the new state,
PC/XT systems can NOT do this. This utility is useful for cases
where the actual states have become different from the state the
keyboard shows. Some applications do change the CAPS or NUM LOCK
keys, but do NOT restore it.
EXAMPLE:
CHKLOCK C
Toggles the caps lock to its alternate, if on, toggles it off.
Replace the C in the above, with either N for num lock or S for
scroll lock .
CHKDRVR will test for 8 possible driver types, returning the
appropriate errorlevel. (see CHKDRVR.DOC).
CLRKEY is very useful, when used with our keyboard input
routines, such as GALF. Use CLRKEY to clear the keyboard
typeahead buffer when starting a keyboard input routine to assure
that no key is in the typeahead buffer, this eliminates false
entries.
EXAMPLE:
ECHO OFF
CLS
{Display a menu}
CLRKEY
GALF
{Do something based upon the errorlevel}
This short file would get an alpha keystroke, after first
clearing any existing key stroke from the type ahead buffer. GALF
sets an errorlevel equal to the alpha key, where 1=A and 26=Z.
GALF ignores alpha key case (upper or lower case is the same).
8
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
CR is a replacement for the DOS PAUSE command. CR does NOT allow
any key stroke, instead beeping if any key other than the ENTER
key is pressed. Alternately, the Escape and ^C can cause CR to
exit to the next batch command.
DFREE places the bytes on a specified drive, into a variable or
will display the result. The size is specified as a whole number,
in bytes. Thus 360K = 360000 .
DRVLST places a list of drives into a variable. Use INSTR and MID
to extract or find a specific drive.
DSKRDY is a powerful testing system for floppy based systems. All
results set an errorlevel, depending upon the result. This
utility not only tests if a disk is installed or the drive is
ready, but if the disk has been formatted as well.
ENVSIZE is useful, to test the DOS environment space. We suggest
you use this to test if there is space available for the
variables which many of our utilities will set, prior to using
the utility. An enhanced version of this, sent with registration
of ENVSIZE or SEBFU, will test a matching value to the actual
size, generating an errorlevel based upon the result, such as
equal to, greater than or less than.
FUNKEY is a utility which waits for a function key to be pressed,
then exits with an errorlevel equal to the function key number of
1 thru 10. The new function keys 11 and 12 are NOT tested for.
GALF is one of our most useful keyboard input routines. This
utility plus GETNUM allow for almost any possible menu system to
be created. If we have the following menu in the file MENU
MENU:
A) Word-processing
B) Accounting
C) Checking System
D) UTILITIES
E) GAMES
And a second menu with
MENU2:
1) Wordstar
2) WordPerfect
3) MicroSoft Word
0) Main Menu
9
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
We could create the following batch file
EXAMPLE: Batch file name is MENU.BAT
ECHO OFF
WINDOW 1 1 1 80 /F14 /B4
LOCATE 1 36
WRITE M E N U
WINDOW 2 1 25 80 /F7 /B1
LOCATE 3 1
WRITEF MENU
GOTO LP2
:LP1
BEEP
:LP2
GALF
IF ERRORLEVEL 6 GOTO LP1
IF ERRORLEVEL 5 GOTO GAMES
IF ERRORLEVEL 4 GOTO UTIL
IF ERRORLEVEL 3 GOTO CHK
IF ERRORLEVEL 2 GOTO ACNT
IF ERRORLEVEL 1 GOTO MENU2
GOTO XIT
:GAMES
{Do a games menu ?}
MENU
:UTIL
{Menu of utilities}
MENU
:CHK
QUICKEN
MENU
:ANCT
LOTUS
MENU
:MENU2
WINDOW 2 1 25 80 /F7 /B1
LOCATE 3 1
WRITEF MENU
GETNUM 0123
IF ERRORLEVEL 3 GOTO WS
IF ERRORLEVEL 2 GOTO WP
IF ERRORLEVEL 1 GOTO MS
MENU
:WS
WS
MENU
:WP
WP
MENU
:MS
WORD
MENU
10
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
The above batch file (MENU.BAT) is only a basic example of what
you could create in making a menu, using a batch file. I have
created batch files with several hundred command lines, which
give my clients very powerful menus. Many of my customers rarely
use a DOS prompt, but never by expensive menu systems !
Notice our use of several SEBFU commands, and extensive use of
the batch file ERRORLEVEL function. SEBFU is one of the few
utilities written especially to use this very powerful DOS
feature. Our first function used, is WINDOW , which clears a
portion of the display to a selected color (yellow on red). This
is definitely something DOS commands do NOT offer.
Next, we position the cursor to line 1, about the middle, so we
can display the title 'M E N U' centered. A utility to center
text on a line is included with registration of SEBFU. An
advantage of WRITE is the ability to use existing screen colors
to display the text, which is what the WINDOW command did.
Another WINDOW command clears the rest of the display (thru line
25), to white on blue. We then use the LOCATE command to position
the cursor at the 3rd line and display our first menu, using the
WRITEF command (available to registered users). We use this,
since it also uses existing colors to display text. If you do NOT
have WRITEF, create a sequence of WRITE and LOCATE statements to
place the menu lines into the batch file.
The GOTO branches to the keyboard input function GALF, which
waits for alpha keys. The first errorlevel tested for is a 6,
which corresponds to F, which is NOT a menu choice, thus we
branch to the label LP1 which simply beeps the speaker and
restarts GALF.
Testing for errorlevels 1 thru 5 cause the batch file to branch
to the label following the GOTO. The line following the last
errorlevel test is arrived at when the user presses the ESCAPE or
^C, this is how we exit the menu. The user may include text, in
the menu, letting the user know how to get a DOS prompt.
Normally, since we only want qualified persons at a DOS prompt in
a business, we don't place this information into the batch file,
but instead let those who need such access, have the information
directly. Following the batch file down to the label MENU2, we
present the second menu type using our GETNUM function.
GETNUM does NOT automatically exit with the ESCAPE or ^C so we
place the 0 as a menu choice to exit to the main menu. Once
GETNUM has functioned, the balance of the batch file is just like
the commands following the GALF command.
11
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
If you want to know the current location of the cursor, you can
use our GCURS function, which will return either the row, column
or both. GDIR is a very powerful function, and can be used to
change directories automatically.
EXAMPLE:
ECHO OFF
CLS
GDIR LEV1
CD \WORD
WORD
CD %LEV1%
Although we used the variable, LEV1, any variable name may be
used. Since, any variable can be used, the user could save
several of these and return to one at any time.
GDRIVE is a power aid to batch file execution. We can save the
drive in any valid DOS variable. Thus, between GDIR and GDRIVE,
we know the drive and directory of previous events.
EXAMPLE:
ECHO OFF
CLS
GDIR DIR1
GDRIVE DRV1
D:
GDIR DIR2
CD\WORD
WORD
CD %DIR2%
%DRV1%:
CD %DIR1%
SET DRV1=
SET DIR1=
SET DIR2=
In this example, we save both the current drive and path in
variables DIR1 and DRV1, plus the current directory of the drive
we change to. In this way, we preserve both paths and return back
to the originating drive and directory at the conclusion of the
application (WORD).
** An important note, GDRIVE does NOT add a colon to the drive
letter, thus when specifying the drive (line before CD %DIR1%),
be sure to add the color as we did. **
12
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
GETCOLR will return an errorlevel or set an environment variable
equal to the color at the current cursor location. When using the
errorlevel mode GETCOLR will automatically return an errorlevel
equal to the foreground color. If the back ground color is
desired as an errorlevel, use the option switch '/B'. Both values
may be returned in variables with the use of the option switch
'/V'. This switch causes both values to be placed into separate
variables, FCOL for foreground and BCOL for background.
GETVER returns the current DOS version. IE... if the Dos version
is 3.x then GETVER returns 3, for 2.x returns 2, etc...
GETVER will return the minor portion of the DOS version by
appending the option switch '/M', IE... 3.2 returns 2, 3.3
returns 3, etc...... IF you wish the entire version number, you
can place this into a variable called VER by using the option
switch '/V'.
GEXT waits for extended key entries. To use this correctly, you
will have to refer to the DOS scan code reference chart, or scan
code reference chart which came with your keyboard, as GEXT
returns an errorlevel equal to the scan code of the key pressed.
If a key other than an extended key is pressed, GEXT will beep.
Extended keys are keys such as function keys, page and arrow
keys, insert & delete, home and end.
Registered version brings details on extended key codes.
GMEM will display the total available conventional ram, or by
using an optional switch, '/R', display the bytes remaining.
Also, the user may specify the use of a variable by using the
option switch '/V', which places the value into the variable RAM
GSMODE can change your video mode, yes, even to graphics mode.
Now you can change to graphics mode, even from a dos prompt.
Additionally, GSMODE will return an errorlevel equal to the
current video mode. This feature, along with the ability to set
the mode, is very useful when running some games. The following
example will demonstrate how to use this powerful command.
13
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
EXAMPLE:
ECHO OFF
CLS
GSMODE
FOR %%F IN (1237) DO IF ERRORLEVEL %%F SET MODE=%%F
GAME
GSMODE
IF ERRORLEVEL 8 GOTO GRPH
IF ERRORLEVEL 7 GOTO XIT {MONO ?}
IF ERRORLEVEL 4 GOTO GRPH
GOTO XIT
:GRPH
GSMODE %MODE%
:XIT
The 3rd line gets the current mode, which is then saved in
variable MODE on line 4. Line 5 executes the game, 7 gets the
mode after executing the game. The next 3 lines check if we are
in graphics or monochrome, or exit if in color text mode. Two
errorlevel tests branch to GRPH which will restore the video mode
to the correct mode. Of course, we could have simply left the
testing out, and restored whatever mode was in effect prior to
starting the game. We did NOT do this, as many menu systems use
graphics (such as WINDOWS).
INKEY is a very powerful input routine, as it sets an errorlevel
for any keystroke, which is NOT an extended key, to the ascii
value of the key pressed. IE... if 'a' is pressed, the ascii
value is 97, while 'A' is 65 and a space is 32.
INSTR and MID can be used together or separately. One, INSTR,
will find the position in a variable, of a specified character,
while the other extracts a portion of a variable.
EXAMPLE:
ECHO OFF
CLS
INSTR PATH /C:
FOR %%F IN (1 2 3 4 5 6 7 8 9) DO IF ERRORLEVEL %%F SET P=%%F
MATH /-1 /VP
MID %P% 2 PATH DRV
The above will place the name of the first drive found in the
PATH string, since each drive is appended with a color. The line
containing INSTR finds the position of the first colon, while the
following line sets variable P equal to the result. MATH is our
utility to subtract or add values to variables, in this example,
we subtract 1 from P, to obtain the drive letter position. The
last line places the 2 characters, drive letter and colon into
variable DRV.
14
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
INVERT will reverse the foreground and background colors, IE.. if
the foreground is white and background is blue, then INVERT will
change the background to white and foreground to blue.
KEYSTAT tests for various special keyboard flags, such as shift,
control, caps lock, insert, etc..... This can be used to give
special meaning to our input routines, such as GALF or INKEY.
KSTAT is slightly different from KEYSTAT, in that it tests for
any key being pressed, returning an errorlevel of 1 if a
standard key has been pressed, or 2 if an extended key is
pressed, and 0 if none has been pressed. With this utility, we
can cause a batch file to perform tasks until a key is pressed.
LCASE is a utility to convert all characters in a variable to
lower case. UCASE performs the opposite task.
LEN is a utility to get the length of any variable, to an
errorlevel. This is useful when displaying variables, and you
know the cursor is NOT at the end of a line.
LINE will draw lines, up to 255 characters in length, using
various text characters, including the line drawing characters in
the extended character set.
LOG is a computer logging system, and can be used to develop IRS
tracking records of your computer usage.
MOVCUR is a power cursor location utility, which moves the cursor
in the desired direction, relative from its current position.
IE... if you wanted to move up 5 lines, and the cursor is at line
8, column 10, then the cursor would move to line 3, column 10.
PATHCK can verify the existence of a specified path. This can be
useful to avoid the DOS 'path not found' message.
PFF simply sends the printer a form feed.
PRDY returns an errorlevel based on the printer status, where a
zero indicates everything is ok.
PRINTC is a powerful enhancement to any DOS batch file. Set a
batch file with lines containing setup strings for various
printer modes, the call the batch file with the selected
function.
15
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
EXAMPLE: PMODE.BAT
ECHO OFF
CLS
IF %1*==* GOTO HELP
IF %1==1 GOTO PICA
IF %1==2 GOTO ELITE
IF %1==3 GOTO LM
ECHO Invalid option
:HELP
ECHO Usage PMODE 1 {Pica mode}
ECHO PMODE 2 {Elite mode}
ECHO PMODE 3 l (left margin value)
GOTO XIT
:PICA
PRINTC 27 80
GOTO XIT
:ELITE
PRINTC 27 77
GOTO XIT
:LM
PMODE 27 108 %2
:XIT
Although in this example, we have only 3 choices, the batch file
could contain dozens of them, instead. Our first PRINTC use, to
set PICA mode is ESCAPE (27) and "M" (80), the second use sets
the printer to elite and the final, requires a second value.
Notice our test early in the batch file of %1*==*, this is a
typical way to check if a parameter is available. If %1, the
first command line parameter, is empty, this result of the test,
is that %1 (the variable) plus "*" is equal to just "*" ! When
this is the case, we branch to our label HELP, which displays the
usage and exits.
PRNSET will cause a hardware reset to the attached printer,
provided the printer supports this capability.
PWRD is a password system, and PWRD.DOC provides enough
information on usage. This utility is very useful, and could be
included as the first command (line 1) of the AUTOEXEC.BAT file.
RESP is a very powerful utility, as it allows inputting several
keystrokes at one time. The utility can be used as a low level
password system by selecting the no echo option. With this, the
user can select functions, drives, paths or most anything from a
batch file. We can even ask the user their name.
16
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
ROWS checks your system for the number of rows available on the
video device. This is useful when placing information on EGA or
VGA systems, since they can have more than 25 !
SAVEKEY is very powerful. Now, you can have your batch file pass
commands to your application. SAVEKEY places a string, of up to
16 characters, into the keyboard type ahead buffer. Thus, for any
application allowing type ahead, we can move past, say an opening
screen, select a file to edit, and more..
SCRLMSG will scroll a message, of any length supported by the
DOS command line, from right to left on the current cursor line.
The line can first be cleared, using our WINDOW utility. This is
great, for menus with a scrolling message, while waiting for a
key stroke. SCRLMSG exits after any key press.
SDATE is an easy to use utility to set the DOS date, which may be
needed after running some games or applications. STIME is the
utility to set the time.
SETERR is used to set an errorlevel, which may be required by
some applications.
SOUND is a little utility to make various noises. You select the
duration (up to several seconds) and the tone (frequency). Use
this to replace the flat beep of our BEEP utility. Useful to
announce error conditions, etc....
STRING is a utility to display one character as a string, IE...
STRING /CA /L5 will display a string of 5 'A' s......
PSTRING is does the same as STRING, but the string is printer,
rather than displayed.
SWIDTH finds the width of the video system (number of usable
columns). This is useful when dealing with VGA or EGA systems
which can support 90 or more columns.
TC is a utility to hide or un-hide the cursor.
TD will display the date and/or time at a specified position, or
at the current cursor location.
WAIT is used to pause a batch file just after displaying a
message, or to pause prior to doing something.
17
S E B F U Version 4.0
(C) 1989-1991 Scanlon Enterprises
SUMMARY REFERENCE / USER GUIDE
WDATE and WTIME are the utilities to get the current date and
time, as DOS knows it. These can be used in a batch file to run
special applications at specified times or dates.
WINDOW is our handy screen clearing utility. WINDOW will clear
any portion (including all) to any color values (foreground and
background), or scroll any portion of the display up or down.
WRITE is our replacement for the ECHO command, and is more useful
in some instances, such as when color is required, or at least
desired. This utility will also write messages (strings) to other
video pages (if supported), thus by using our PAGE utility to
switch between pages, we can view the message. Also we can
display parts of a message on the same line.
YN is a simple little utility to simply wait for yes/no responses
using the single key response of y/n ('y' or 'n'). YN responds to
either upper or lower case with the same result.
This concludes the documentation for SEBFU shareware version. For
details on registering SEBFU and what your registration brings,
please read ORDSEBFU.DOC . Registering SEBFU is really a
bargain.
18