home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 17
/
CD_ASCQ_17_101194.iso
/
vrac
/
abatvw2.zip
/
ALEARNME.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-07-16
|
11KB
|
303 lines
@ECHO OFF
REM MENUED TUTORIAL FOR A BATCH VIEW UTILITY SET PROGRAMS
IF EXIST TUTOR.MNU GOTO CHKEXE
CLS
ECHO Missing Support File (TUTOR.MNU)
ECHO Program cannot continue!
GOTO END
:CHKEXE
IF EXIST ABATMENU.EXE GOTO MENUOK
CLS
ECHO Cannot Find Executable File ABATMENU.EXE !
GOTO END
:MENUOK
IF EXIST AMSG.EXE GOTO READROK
CLS
ECHO Cannot Find Executable File AMSG.EXE !
GOTO END
:READROK
IF EXIST AECHO.EXE GOTO TOPBAT
CLS
ECHO Cannot Find Executable File AECHO.EXE !
GOTO END
:TOPBAT
ABATMENU.EXE "TUTOR.MNU @TUTR"
IF ERRORLEVEL 13 GOTO TUTEND
IF ERRORLEVEL 12 GOTO APGE
IF ERRORLEVEL 11 GOTO ABJB
IF ERRORLEVEL 10 GOTO ABINF
IF ERRORLEVEL 9 GOTO ACLR
IF ERRORLEVEL 8 GOTO AECKO
IF ERRORLEVEL 7 GOTO AMSCRL
IF ERRORLEVEL 6 GOTO TXTFILS
IF ERRORLEVEL 5 GOTO MSGEXMP
IF ERRORLEVEL 4 GOTO MSGPRG
IF ERRORLEVEL 3 GOTO MENEXP
IF ERRORLEVEL 2 GOTO ABMENU
IF ERRORLEVEL 1 GOTO GENRL
IF ERRORLEVEL 0 GOTO TUTEND
GOTO TOPBAT
:GENRL
ACLS +31
AECHO /@205:75
AECHO "You can Display a Quick Help Screen for any of the Utility programs"
AECHO "except Aecho.exe by typing its name on the dos command line. The help"
AECHO "screens will provide you with a short description of how the program"
AECHO "operates and what switches or options are available for it."
AECHO "The Aecho help screen may be viewed by using it's /h option."
AECHO /@196:70
AECHO "To view the help screens enter the program name on the command line,"
AECHO "like this...C:> ACLS"
AECHO /@196:70
AECHO "This menu will display all of the utility program help screens,"
AECHO "give a brief explanation of how each of the utilities works,"
AECHO "and provide several examples to illustrate the use of key"
AECHO "programs."
AECHO /@196:70
AECHO "Here's a look at the help screen for the ACLS program."
AECHO /@196:60
AMSCROLL /pauz +27 26 A
call ACLS
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:ABMENU
ACLS +31
AECHO /@205:75
AECHO "The Abatmenu program allows you to create custom menus for"
AECHO "just about anything. You can launch programs, batch files,"
AECHO "Dos commands, set system variables, etc.."
AECHO /@205:75
AECHO "To use the program you need to be familiar with"
AECHO " DOS ERRORLEVEL CODES"
AECHO "DOS allows programs to return a one byte numeric code"
AECHO "ranging from 0-255. These codes may be used to direct"
AECHO "Batch file execution to specific labels. This process"
AECHO "is covered in more detail within the utility set manual."
AECHO /@196:65
AECHO "The basic arrangment of Batch file commands is as follows..."
AECHO "IF ERRORLEVEL 2 GOTO LABEL2"
AECHO "IF ERRORLEVEL 1 GOTO LABEL1"
AECHO "IF ERRORLEVEL 0 GOTO END"
AECHO "Labels within batch files look like this.."
AECHO ":LABEL1"
AECHO /@196:65
AECHO "The Menu Examples section gives general guidelines for menu"
AECHO "creation and color attribute use. You may also wish to reference"
AECHO "the text file tutorial for an explanation of how to use ASCII"
AECHO "Files to create large menus."
AECHO "Here's the Abatmenu Help Screen."
AMSCROLL /pauz +27 26 A
call abatmenu.exe
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:MENEXP
CALL AEXMPLES.BAT
GOTO TOPBAT
:MSGPRG
ACLS +31
AECHO /@205:75
AECHO "The Amsg program allows you to create and display user"
AECHO "information screens. A variety of useful system info may"
AECHO "be displayed by using available option switches. You may"
AECHO "supplement program generated information or display your"
AECHO "own messages. Amsg also provides a method of inputing or"
AECHO "passing information through the DOS system Environment,"
AECHO "as well as allowing you to implement a YES/NO branching"
AECHO "mechanism to control batch file flow."
AECHO /@205:75
AECHO "Besides displaying information, Amsg will return"
AECHO " DOS ERRORLEVEL CODES"
AECHO "in relation to most of it's option switches."
AECHO "Errorlevel codes reflect pertinent system info,"
AECHO "and may be used to contol batch file flow."
AECHO /@196:75
AECHO "The Message Examples section gives general guidelines for message"
AECHO "screen creation and color attribute use. You may also wish to"
AECHO "reference the text file tutorial for an explanation of how to use"
AECHO "ASCII Files to create large message screens."
AECHO "Here's the Amsg Help Screen."
CALL AMSCROLL /PAUZ +27 26 A
CALL AMSG.EXE
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:MSGEXMP
CALL AMSGEXMP.BAT
GOTO TOPBAT
:TXTFILS
CALL ATXTFILE.BAT
GOTO TOPBAT
:AMSCRL
ACLS +11
AECHO
AECHO
AECHO " Amscroll provides an alternative mechanism to display"
AECHO " short eye catching messages, or frame your screens for "
AECHO " maximum effect."
AECHO
AECHO " Messages or graphics may be displayed anywhere on the"
AECHO " the screen in numerous aesthetic fashions."
AECHO
AECHO " Option switches control the style of display as well as"
AECHO " allowing you to control the color, and speed of your message."
AECHO
AECHO " Default text color, and movement speed are supplied by the"
AECHO " program for you, if you do not wish to provide them."
AECHO
AECHO " One practical use for this utility is to implement a custom"
AECHO " pause within your batch files in order to display your screens."
AECHO
AECHO " Here's the Amscroll Help Screen."
AECHO +15 " - Press Any Key to Continue -"
CALL AMSCROLL.EXE /peri +79 26 A *
CALL AMSCROLL
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:AECKO
ACLS +31
AECHO /@205:75
AECHO "Aecho is an enhanced replacement or substitute for the "
AECHO "familiar DOS ECHO command. As an added extra you may also"
AECHO "display ASCII text files with automatic pausing. "
AECHO /@196:70
AECHO "The Aecho utility is used through out this tutorial to"
AECHO "display text and graphic characters. It will allow you"
AECHO "display any printable ascii character on the video screen."
AECHO /@196:75
AECHO "You can control the column placement and color of display"
AECHO "screen text as well as use a spinning cursor to print it out."
AECHO "Embedded control options may be placed within text files to"
AECHO "create stored color graphic displays."
AECHO /@196:75
AECHO "In order to display the help screen you will need to employ"
AECHO "the /h option switch with this utility. Typing the program"
AECHO "name alone displays a blank line."
AECHO /* +27 "Here's a look at the AECHO Help screen."
AMSCROLL /pauz +27 26 A
call aecho.exe /h
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:ACLR
ACLS +31
AECHO /@205:75
AECHO "The ACLS program provides several alternative methods of"
AECHO "clearing the video screen. It contains traditional and"
AECHO "unconventional algorithms for your amusement."
AECHO /@196:70
AECHO "Unlike the DOS CLS program you must use an option switch"
AECHO "to clear the screen. Typing the program name alone on the"
AECHO "command line will display a help screen."
AECHO /@196:70
AECHO "A couple of things worth mentioning...."
AECHO "There is an option to clear user specified blocks of the"
AECHO "video screen."
AECHO "Several of the options incluse small sound effects."
AECHO /@196:70
AECHO "Here's the help screen "
call amscroll /pauz +27 26 A
call acls.exe
AMSCROLL /pauz +27 26 A
call acls.exe +7 /hz
GOTO TOPBAT
:ABINF
ACLS +31
AECHO /@205:75
AECHO "Abatinfo as its name implies was written to provide your"
AECHO "batch files with information. This is one of the primary"
AECHO "mechanisms of program flow control or directed action."
AECHO "In this respect it departs from the visual concept that"
AECHO "most of the utility set is built around. However, it's"
AECHO "functionality and importance should be obvious."
AECHO /@196:70
AECHO "Dos Errorlevel Codes and Environment Variables are the"
AECHO "conveyors of returned information. Some options provide"
AECHO "string information assigned to the environment variable"
AECHO "INFO. Direct numeric values are returned if the 0-255"
AECHO "range permits, however in some cases a simple boolean"
AECHO "return value is all thats necessarry. 0 = FALSE, 1 = TRUE"
AECHO /@196:70
AECHO "You must test the returned value in your batch file and"
AECHO "branch to the appropriate label. Here's a simple test to"
AECHO "check the condition of the keyboard numberlock - Abatinfo /nmbl"
CALL ABATINFO /NMBL
IF ERRORLEVEL 1 GOTO NMBON
IF ERRORLEVEL 0 GOTO NOTON
:NMBON
AECHO "Your Number Lock is on!"
GOTO DEMEND
:NOTON
AECHO "Your Number Lock is off!"
:DEMEND
AECHO /@196:70
AECHO "Here's the help screen "
call amscroll /pauz +27 26 A
call abatinfo.exe
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:ABJB
ACLS +31
AECHO /@205:75
AECHO "Abatjob has a variety of options to perform system and"
AECHO "video screen tasks from within your batch files. It is"
AECHO "designed to compliment the Abatinfo utility by allowing"
AECHO "you to assume some measure of control over the computer"
AECHO "hardware and ACT on the information returned from that"
AECHO "utility."
AECHO /@196:70
AECHO "Some of the more important aspects of this utility include"
AECHO "the ability to implement a loop counter in the DOS environment,"
AECHO "control the size and shape of the CURSOR, and perform selective"
AECHO "actions on all or part of the video screen. If you write complex"
AECHO "user interactive batch files, this utility may be an important"
AECHO "part in rounding out your creations."
AECHO /@196:70
AECHO "Many of the options provided by this utility require specific"
AECHO "parameter passing. Since these can affect the video display,"
AECHO "please reference the utility set manual for in depth details"
AECHO "on each option."
AECHO /@196:70
AECHO "Here's a look at the Help Screen."
call amscroll /pauz +27 26 A
call abatjob.exe
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:APGE
ACLS +31
AECHO /@205:75
AECHO "The Apage utility is an ASCII text file reader. Although"
AECHO "it was not written for batch file use, it has been included"
AECHO "in the utility set package in order to enhance the support"
AECHO "files, and allow you to quickly reference the manual. You"
AECHO "may of course, use it in your batch files if you so desire."
AECHO /@196:70
AECHO "If your familiar with the DOS EDIT utility your probably asking"
AECHO "yourself, WHY should I need to use this utility at all. The fact"
AECHO "of the matter is that most of the time there is no particular"
AECHO "advantage in using it. However, if you need to browse or reference"
AECHO "a large text file, such as a catalog or listing, the DOS EDIT"
AECHO "utility may come back with the NOT ENOUGH MEMORY message."
AECHO /@196:70
AECHO "Apage allows you to view Ascii text files as large as 3 MB in any"
AECHO "valid screen color combination. It allows you to go to the end of"
AECHO "the file quickly by simply pressing the END key. Arrow and Page"
AECHO "keys are fully functional and sound effects are optional."
AECHO /@196:70
AECHO "Here's a look at the Help Screen."
call amscroll /pauz +27 26 A
call apage.exe
AMSCROLL /pauz +27 26 A
GOTO TOPBAT
:TUTEND
acls +7