home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
word
/
text
/
010
/
go.bat
< prev
next >
Wrap
DOS Batch File
|
1993-04-08
|
4KB
|
156 lines
ECHO OFF
:begin
if exist %1 goto fileexists
TED UNNAMED.TXT
IF ERRORLEVEL 10 goto quit
IF ERRORLEVEL 8 goto viewtam1
IF ERRORLEVEL 7 goto printam
goto quit
:fileexists
TED %1
IF ERRORLEVEL 10 goto quit
IF ERRORLEVEL 8 goto viewtam2
IF ERRORLEVEL 7 goto printam
goto quit
:viewtam1
T UNNAMED.TXT TEMP.TAM O
goto viewtam
:viewtam2
T %1 TEMP.TAM O
:viewtam
P TEMP.TAM ATI
goto begin
:printam
CLS
ECHO ─────────────────────────────────────────────────────────────────────
ECHO ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
ECHO ┌────────────────────┐
ECHO │ HARD COPY OPTIONS │
ECHO └────────────────────┘
ECHO The file you last viewed will be printed.
ECHO You should have already viewed the file you are going to print.
ECHO If not press Q to return to the editor.
ECHO ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
ECHO E - Epson /IBM Dot matrix printer
ECHO C - Color Dot matrix printer
ECHO H - HP Laser printer
ECHO Q - Quit
CHOOSE 7 Type E, C, H or Q:
IF ERRORLEVEL 113 goto begin
IF ERRORLEVEL 104 goto hplaser
IF ERRORLEVEL 101 goto epson
IF ERRORLEVEL 99 goto colord
IF ERRORLEVEL 81 goto begin
IF ERRORLEVEL 72 goto hplaser
IF ERRORLEVEL 69 goto epson
IF ERRPRLEVEL 67 goto colord
goto printam
:hplaser
CLS
ECHO ─────────────────────────────────────────────────────────────────────
ECHO ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
ECHO ┌────────────────────┐
ECHO │ HPLASER OPTIONS │
ECHO └────────────────────┘
ECHO P - Parellel Port
ECHO F - Print to file
ECHO 1 - Serial port COM1
ECHO 2 - Serial port COM2
ECHO Q - Quit
CHOOSE 7 Type P, F, 1, 2, Q:
IF ERRORLEVEL 113 goto printam
IF ERRORLEVEL 112 goto hparellel
IF ERRORLEVEL 102 goto temphpl
IF ERRORLEVEL 81 goto printam
IF ERRORLEVEL 80 goto hparellel
IF ERRORLEVEL 70 goto temphpl
IF ERRORLEVEL 50 goto hserial2
IF ERRORLEVEL 49 goto hserial1
goto hplaser
:hserial1
MODE COM1:9600,n,8,1,p
MODE LPT1=COM1
goto hparellel
:hserial2
MODE COM2:9600,n,8,1,p
MODE LPT1=COM2
:hparellel
P TEMP.TAM hplaser PRN
goto begin
:temphpl
P TEMP.TAM hplaser
goto begin
:epson
CLS
ECHO ─────────────────────────────────────────────────────────────────────
ECHO ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
ECHO ┌──────────────────────┐
ECHO │ DOT MATRIX OPTIONS │
ECHO └──────────────────────┘
ECHO P - Parellel Port
ECHO F - Print to file
ECHO 1 - Serial port COM1
ECHO 2 - Serial port COM2
ECHO Q - Quit
CHOOSE 7 Type P, F, 1, 2, Q:
IF ERRORLEVEL 113 goto printam
IF ERRORLEVEL 112 goto eparellel
IF ERRORLEVEL 102 goto tempeps
IF ERRORLEVEL 81 goto printam
IF ERRORLEVEL 80 goto eparellel
IF ERRORLEVEL 70 goto tempeps
IF ERRORLEVEL 50 goto eserial2
IF ERRORLEVEL 49 goto eserial1
goto epson
:eserial1
MODE COM1:9600,n,8,1,p
MODE LPT1=COM1
goto eparellel
:eserial2
MODE COM2:9600,n,8,1,p
MODE LPT1=COM2
:eparellel
P TEMP.TAM epson PRN
goto begin
:tempeps
P TEMP.TAM epson
goto begin
:colord
CLS
ECHO ─────────────────────────────────────────────────────────────────────
ECHO ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
ECHO ┌────────────────────────────┐
ECHO │ COLOR DOT MATRIX OPTIONS │
ECHO └────────────────────────────┘
ECHO P - Parellel Port
ECHO F - Print to file
ECHO 1 - Serial port COM1
ECHO 2 - Serial port COM2
ECHO Q - Quit
CHOOSE 7 Type P, F, 1, 2, Q:
IF ERRORLEVEL 113 goto printam
IF ERRORLEVEL 112 goto cparellel
IF ERRORLEVEL 102 goto ctempeps
IF ERRORLEVEL 81 goto printam
IF ERRORLEVEL 80 goto cparellel
IF ERRORLEVEL 70 goto ctempeps
IF ERRORLEVEL 50 goto eserial2
IF ERRORLEVEL 49 goto eserial1
goto colord
:eserial1
MODE COM1:9600,n,8,1,p
MODE LPT1=COM1
goto cparellel
:eserial2
MODE COM2:9600,n,8,1,p
MODE LPT1=COM2
:cparellel
P TEMP.TAM color PRN
goto begin
:ctempeps
P TEMP.TAM color
goto begin
:quit
CLS
TYPE ADAMI.MSG