home *** CD-ROM | disk | FTP | other *** search
- echo off
-
- rem SETPRN.BAT
-
- rem If you get an "Out of environment space" message, increase your
- rem environment space by using shell configuration in config.sys:
- rem MsDos 3.30 example: shell=c:\bin\command.com /e:1024 /p
-
- rem Check that ask.exe is available at path or the current directory
- set _found=no
- if exist ask.exe set _found=yes
- for %%d in (%path%) do if exist %%d\ask.exe set _found=yes
- if "%_found%"=="no" goto _err2
-
- :_begin
- cls
- echo ┌───────────────────────────────────────────────────────────────────┐
- echo │ Set an Epson compatible printer (Diconix 150) from a batch menu │
- echo │ By Prof. Timo Salmi, ts@chyde.uwasa.fi, Vaasa, Finland, 13-Mar-91 │
- echo └───────────────────────────────────────────────────────────────────┘
- echo
-
- rem Make a menu, liven it up with colors
- echo ┌───────────────────────────────┐
- echo │ 0) Exit the menu │
- echo │ 1) Reset printer │
- echo │ 2) Wide condensed │
- echo │ 3) Wide condensed, Emphasized │
- echo │ 4) Condensed │
- echo │ a) Spacing 75 │
- echo │ b) Spacing 80 │
- echo │ c) Spacing 90 │
- echo │ d) Spacing 100 │
- echo │ e) Spacing 123 │
- echo │ f) Spacing 137.5 │
- echo │ g) Spacing 150 │
- echo │ h) Spacing 200 │
- echo └───────────────────────────────┘
-
- rem Make the choice and set the code for the printer
- echo
- ask Select: /l /d
- set _code=
- if errorlevel==48 if not errorlevel==49 set _code=_exit
- if errorlevel==49 if not errorlevel==50 set _code=@
- if errorlevel==50 if not errorlevel==51 set _code=!$
- if errorlevel==51 if not errorlevel==52 set _code=!,
- if errorlevel==52 if not errorlevel==53 set _code=!
- if errorlevel==97 if not errorlevel==98 set _code=
- if errorlevel==98 if not errorlevel==99 set _code=&
- if errorlevel==99 if not errorlevel==100 set _code=+
- if errorlevel==100 if not errorlevel==101 set _code=
- if errorlevel==101 if not errorlevel==102 set _code=
- if errorlevel==102 if not errorlevel==103 set _code=B
- if errorlevel==103 if not errorlevel==104 set _code=H
- if errorlevel==104 if not errorlevel==105 set _code=`
-
- if "%_code%"=="_exit" goto _out
- if "%_code%"=="" goto _err1
-
- rem Send the code to the printer
- echo %_code% > prn
-
- :_again
- ask Select from the menu again (y/n)? /u /d
- if errorlevel==89 if not errorlevel==90 goto _begin
- if errorlevel==78 if not errorlevel==79 goto _out
- echo
- goto _again
-
- :_err1
- echo
- goto :_again
-
- :_err2
- echo
- echo You must have ask.exe at your path (or the current directory)
- goto _out
-
- :_out
- set _code=
- set _found=
- echo
- echo on
-