CT-User
[Top] [All Lists]

Laser printers & CT

To: <ct-user@contesting.com>
Subject: Laser printers & CT
From: 72240.1433@CompuServe.COM (Robert E.Naumann)
Date: 17 Nov 95 11:56:45 EST
I sent this out a while back and it still does the job providing 
the proper laser printer compression codes for the multiplier 
and dupe sheets.   It will run in QBASIC which everyone should 
have with DOS 5 or later.  Just copy all of the lines below the 
line of asterisks into a text file and load it into QBASIC and RUN it.
It will produce a new file with the exstension of .MLZ for .MUL files
or .DLZ for .DUP files.
Good Luck - 
Bob Naumann
KR2J
********************************************************************
'TO: CT-USER
'Re: Qbasic program to laser print *.dup and *.mul
'PROGRAM TO CONVERT Dot Matrix Formatted DUP or MUL Files
'to Laser Printer Codes  by KR2J
'If you have a Quickbasic compiler, you can create an executable
'program from this file and use the following line instead of using the
'file name input routine for QBasic
'ProcessFile$ = COMMAND$
'The command$ function allows you to give the program the filename
'as a command line parameter ala "ct binfile"
CLS
' the following 2 lines should be removed if you compile this program
' in MicroSoft QuickBasic
PRINT "Enter the file name with the extension and press Enter"
INPUT ProcessFile$
ProcessFile$ = UCASE$(ProcessFile$)
IF ((INSTR(ProcessFile$, ".DUP")) OR (INSTR(ProcessFile$, ".MUL"))) THEN
 nufile$ = LEFT$(ProcessFile$, INSTR(ProcessFile$, ".") + 1) + "LZ"
 CLS
 LOCATE 1, 3
 PRINT "   Dot Matrix to HP Laser Formatter for -DUP- amd -MUL- Files ";
 LOCATE 3, 3
 PRINT " A file called "; nufile$; " will be generated "
 LOCATE 4, 3
 PRINT " that will be printable on an HP Laser Printer or Compatible";
 LOCATE 10, 10
 PRINT " Processing Line Number "
 OPEN ProcessFile$ FOR INPUT AS #1 LEN = 2048
 OPEN nufile$ FOR OUTPUT AS #2 LEN = 2048
 WHILE NOT EOF(1)
  LINE INPUT #1, Work$
        X = X + 1
        IF X = 1 THEN PRINT #2, CHR$(27) + "(s0p10H"
        LOCATE 10, 36
        PRINT X;
        PrintReset = INSTR(Work$, CHR$(18))
        SmallPrint = INSTR(Work$, CHR$(15))
        IF PrintReset THEN
                MID$(Work$, PrintReset) = CHR$(27)
                Front$ = MID$(Work$, 1, PrintReset)
                End$ = MID$(Work$, PrintReset + 1, LEN(Work$))
                Converted$ = Front$ + "E" + End$
                Front$ = ""
                End$ = ""
        END IF
        IF SmallPrint THEN
                MID$(Work$, SmallPrint) = CHR$(27)
                Front$ = MID$(Work$, 1, SmallPrint)
                End$ = MID$(Work$, SmallPrint + 1, LEN(Work$))
                PRINT #2, Front$ + "(s0p16.66H"
                Converted$ = End$
                Front$ = ""
                End$ = ""
        END IF
        IF SmallPrint = 0 AND PrintReset = 0 THEN
                Converted$ = Work$
        END IF
        PRINT #2, Converted$
        PrintReset = 0
        SmallPrint = 0
 WEND
ELSE
        PRINT "The file must be either a *.DUP or a *.MUL file"
        END
END IF
CLOSE
END









--
Submissions:              ct-user@ve7tcp.ampr.org
Administrative requests:  ct-user-REQUEST@ve7tcp.ampr.org
WWW:                      http://ve7tcp.ampr.org/Lists/ct-user.html
Questions:                reisert@ve7tcp.ampr.org

<Prev in Thread] Current Thread [Next in Thread>