home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
extensions
/
jd
/
_newprogs
/
querdruck_hp.amos
/
querdruck_hp.amosSourceCode
Wrap
AMOS Source Code
|
1994-03-12
|
2KB
|
58 lines
Set Buffer 200
Close Workbench : Close Editor : Break Off : Curs Off
F$=Fsel$("","","") : If F$="" Then End
Set Input 10,-1
Hide
MX=1
Locate 10,10 : Centre "Lese Daten ein!"
Open In 1,F$
Input #1,TZ$
While Eof(1)=0
Line Input #1,A$ : MX=MX+1
Wend
Close 1
DB=73 : DH=58
SEITEN=MX/DH
If MX mod DH>0 Then SEITEN=SEITEN+1
PRODUKTE=SEITEN/4
If SEITEN mod 4>0 Then PRODUKTE=PRODUKTE+1
If SEITEN<3 Then DZEILEN=2*DH : Goto SKIP3
DZEILEN=PRODUKTE*4*DH
SKIP3:
Dim ZEILE$(DZEILEN)
Open Out 1,"par:"
Print #1,Chr$(27);"&l1O";Chr$(0);Chr$(27);"(s15H";Chr$(0);Chr$(27);"&l24D";Chr$(0);Chr$(27);"(s1Q";Chr$(0)
Close
Wait 10
Open In 1,F$
For X=1 To MX
Line Input #1,ZEILE$(X)
Next
Close 1
Cline : Centre "Es werden"+Str$(SEITEN)+" Seiten gedruckt"
Open Out 1,"PRT:"
S=PRODUKTE*4 : L=1 : DL=0 : Z3$=String$(" ",28)
LOP:
For DI=1 To PRODUKTE
If SEITEN=2 Then S=2 : Swap S,L
Print #1, Extension_22_011A(" -"+Str$(S)+" -",DB,0)+String$(" ",28)+ Extension_22_011A(" -"+Str$(L)+" -",DB,0)
Print #1,""
For X=0 To DH-1
Z1$= Extension_22_0870(ZEILE$((S-1)*DH+X+1),8) : Z2$= Extension_22_0870(ZEILE$((L-1)*DH+X+1),8)
ZEILE$((S-1)*DH+X+1)="" : ZEILE$((L-1)*DH+X+1)=""
If Z1$="" Then Z1$=String$(" ",DB) : Goto SKIP1
If Len(Z1$)<DB Then Z1$= Extension_22_011A(Z1$,DB,1) : Goto SKIP1
If Len(Z1$)>DB Then Z1$=Left$(Z1$,DB)
SKIP1:
If Z2$="" Then Z2$=String$(" ",DB) : Goto SKIP2
If Len(Z2$)<DB Then Z2$= Extension_22_011A(Z2$,DB,1) : Goto SKIP2
If Len(Z2$)>DB Then Z2$=Left$(Z2$,DB)
SKIP2:
Print #1,Z1$+Z3$+Z2$
Next
S=S-2 : L=L+2
Next
If SEITEN=2 or DL=1 Then Close 1 : End
Clear Key : Cline : Centre "Drehe jetzt bitte die Bl�tter um!"
Wait Key : Cline : Centre "Drucke weiter!"
DL=1 : Goto LOP