home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
576-600
/
apd599
/
_newprogs
/
querdruck_star.amos
/
querdruck_star.amosSourceCode
Wrap
AMOS Source Code
|
1994-03-12
|
6KB
|
253 lines
Set Buffer 150
Break Off
Curs Off
F$=Fsel$("","","")
Set Input 10,-1
If F$="" Then Goto _END2
LF$=Chr$(12)+Chr$(0)
MX=0
Open In 1,F$
While Eof(1)=0
Line Input #1,A$ : MX=MX+1
Wend
Close 1
DB=60
SEITEN=MX/77
If MX mod 77>0 Then SEITEN=SEITEN+1
PRODUKTE=SEITEN/4
If SEITEN mod 4>0 Then PRODUKTE=PRODUKTE+1
DZEILEN=PRODUKTE*4*77
Dim ZEILE$(DZEILEN),QUER$(DB)
SZ$=Str$(DZEILEN/77)
BLAETTER=PRODUKTE+2 : BLAETTER$=Str$(BLAETTER)
Locate 10,10 : Centre "Lege bitte"+BLAETTER$+" Bl�tter ein!"
Wait Key
Locate 10,10 : Centre " Initialisiere Drucker! "
Open Out 1,"prt:"
For X=1 To 69
Print #1,""
Next
Print #1, Extension_21_0006
Close 1
Gosub _CHARS
Open In 1,F$
Locate 10,10 : Centre " Lese Daten ein! "
For XX=1 To MX
Z$=""
Line Input #1,Z$
Z$= Extension_22_0870(Z$,8)
If Len(Z$)>DB Then ZEILE$(XX)=Left$(Z$,DB) : Goto SKIP
EX=DB-Len(Z$)
For X=1 To EX
Z$=Z$+" "
Next
ZEILE$(XX)=Z$
SKIP:
Next
Close 1
Locate 10,10
If SEITEN>2 Then Centre "Es werden"+SZ$+" Seiten gedruckt"
If SEITEN<3 Then Centre "Es werden"+Str$(SEITEN)+" Seiten gedruckt"
LZ$=""
For X=1 To DB
LZ$=LZ$+" "
Next
If DZEILEN>MX Then For X=MX+1 To DZEILEN : ZEILE$(X)=LZ$ : Next
Open Out 1,"PRT:"
If SEITEN<3 Then Goto PR0
PR1:
S1=PRODUKTE*4 : L1=1
For DI=1 To PRODUKTE
Gosub _READ_AND_DO
S1=S1-2 : L1=L1+2
Next
Gosub _MELDUNG
For DI=1 To PRODUKTE
Gosub _READ_AND_DO
S1=S1-2 : L1=L1+2
Next
Goto _END
PR0:
S1=1 : L1=2
Gosub _READ_AND_DO
Goto _END
_READ_AND_DO:
S=S1
Gosub _DOIT
For X=1 To 11
Print #1,""
Next
S=L1
Gosub _DOIT
Print #1,LF$
Return
_DOIT:
F=((S-1)*77)+1 : L=S*77
Gosub _DREHEN
For X=1 To DB
Print #1,QUER$(X)
Next
Return
_DREHEN:
For X=1 To DB
QUER$(X)=""
For NR=L To F Step -1
QUER$(X)=QUER$(X)+Mid$(ZEILE$(NR),X,1)
Next
Next
If S<10
QUER$(29)=QUER$(29)+" -"
QUER$(30)=QUER$(30)+Str$(S)
QUER$(31)=QUER$(31)+" -"
End If
If S>9
QUER$(29)=QUER$(29)+" -"
QUER$(30)=QUER$(30)+Left$(Str$(S),2)
QUER$(31)=QUER$(31)+" "+Right$(Str$(S),1)
QUER$(32)=QUER$(32)+" -"
End If
Return
_END:
Close 1
_END2:
Open Out 1,"par:"
Print #1,Chr$(27);"%0";Chr$(0)
Print #1,Chr$(27);"@";Chr$(0)
Close 1
End
_MELDUNG:
Close 1
Open Out 1,"par:"
Print #1,Chr$(27);"@";Chr$(0)
Close
Locate 10,10 : Centre "Drehe jetzt bitte die Bl�tter um!" : Wait Key
Locate 10,10 : Centre " Drucke weiter! "
Open Out 1,"prt:"
For X=1 To 69
Print #1,""
Next
Print #1, Extension_21_0006
Close 1
Open Out 1,"par:"
Print #1,Chr$(27);"%1";Chr$(0);
Print #1,Chr$(27);"A";Chr$(6);Chr$(0);
Print #1,Chr$(27);"2";Chr$(0);
Print #1,Chr$(27);Chr$(10);
Print #1,Chr$(27);Chr$(10);
Print #1,Chr$(27);Chr$(10)
Close 1
Open Out 1,"prt:"
Return
_CHARS:
Open Out 1,"par:"
Print #1,Chr$(27);"&";Chr$(0);Chr$(33);Chr$(126);
Restore UDEF
For C=33 To 126
For M=0 To 11
Read A
Print #1,Chr$(A);
Next M
Next C
Print #1,Chr$(27);"%1";Chr$(0);
Print #1,Chr$(27);"A";Chr$(6);Chr$(0);
Print #1,Chr$(27);"2";Chr$(0);
Print #1,Chr$(27);Chr$(10);
Print #1,Chr$(27);Chr$(10);
Print #1,Chr$(27);Chr$(10)
Close 1
Return
UDEF:
Data 139,0,0,24,0,0,0,24,0,24,0,24
Data 139,0,0,0,0,0,0,0,0,102,0,102
Data 139,0,0,36,0,126,0,36,0,126,0,36
Data 139,0,8,0,28,2,28,0,32,28,0,8
Data 139,0,0,38,0,18,0,8,0,36,0,50
Data 139,0,0,26,0,36,0,24,0,36,0,24
Data 139,0,0,0,0,0,0,16,0,8,0,24
Data 139,0,0,4,0,8,0,8,0,8,0,4
Data 139,0,0,32,0,16,0,16,0,16,0,32
Data 139,0,0,42,0,28,0,8,0,28,0,42
Data 139,0,0,8,0,8,0,62,0,8,0,8
Data 139,16,0,8,0,24,0,0,0,0,0,0
Data 139,0,0,0,0,0,0,60,0,0,0,0
Data 139,0,0,24,0,24,0,0,0,0,0,0
Data 139,0,0,32,0,16,0,8,0,4,0,2
Data 139,0,0,24,0,36,0,36,0,36,0,24
Data 139,0,0,28,0,8,0,8,0,24,0,8
Data 139,0,0,62,0,8,0,4,0,34,0,28
Data 139,0,0,28,0,4,8,16,0,8,0,60
Data 139,0,0,4,0,62,0,20,0,12,0,4
Data 139,0,0,56,0,4,0,56,0,32,0,60
Data 139,0,0,24,0,36,0,56,0,32,0,28
Data 139,0,0,16,0,16,0,8,0,4,0,60
Data 139,0,0,24,0,36,0,24,0,36,0,24
Data 139,0,0,56,0,4,0,28,0,36,0,24
Data 139,0,0,0,0,24,0,0,0,24,0,0
Data 139,16,0,8,0,24,0,0,0,24,0,0
Data 139,0,0,8,0,16,0,32,0,16,0,8
Data 139,0,0,0,0,60,0,0,0,60,0,0
Data 139,0,0,16,0,8,0,4,0,8,0,16
Data 139,16,0,0,0,16,0,8,0,36,0,24
Data 139,0,0,30,0,32,0,46,0,42,0,28
Data 139,0,0,36,0,36,0,60,0,36,0,24
Data 139,0,0,56,0,36,0,56,0,36,0,56
Data 139,0,0,28,0,32,0,32,0,32,0,28
Data 139,0,0,56,0,36,0,36,0,36,0,56
Data 139,0,0,60,0,32,0,56,0,32,0,60
Data 139,0,0,32,0,32,0,56,0,32,0,60
Data 139,0,0,28,0,34,0,46,0,32,0,30
Data 139,0,0,36,0,36,0,60,0,36,0,36
Data 139,0,0,28,0,8,0,8,0,8,0,28
Data 139,0,0,24,0,36,0,4,0,4,0,14
Data 139,0,0,36,0,40,0,48,0,40,0,36
Data 139,0,0,60,0,32,0,32,0,32,0,32
Data 139,0,0,34,0,34,0,42,0,54,0,34
Data 139,0,0,36,0,36,0,44,0,52,0,36
Data 139,0,0,24,0,36,0,36,0,36,0,24
Data 139,0,0,32,0,32,0,56,0,36,0,56
Data 139,0,0,26,0,44,0,36,0,36,0,24
Data 139,0,0,36,0,40,0,56,0,36,0,56
Data 139,0,0,60,0,2,0,28,0,32,0,30
Data 139,0,0,8,0,8,0,8,0,8,0,62
Data 139,0,0,24,0,36,0,36,0,36,0,36
Data 139,0,0,8,0,20,0,34,0,34,0,34
Data 139,0,0,34,0,54,0,42,0,34,0,34
Data 139,0,0,34,0,20,0,8,0,20,0,34
Data 139,0,0,8,0,8,0,20,0,34,0,34
Data 139,0,0,60,0,16,0,8,0,4,0,60
Data 139,0,0,36,0,36,0,60,0,36,0,90
Data 139,0,0,24,0,36,0,36,0,36,0,90
Data 139,0,0,24,0,36,0,36,0,0,0,36
Data 139,0,0,0,0,0,0,34,0,20,0,8
Data 11,255,0,0,0,0,0,0,0,0,0,0
Data 139,0,0,0,0,0,0,8,0,16,0,24
Data 139,0,0,26,36,0,28,0,4,56,0,0
Data 139,0,0,56,0,36,0,56,0,32,0,32
Data 139,0,0,28,0,32,0,32,0,28,0,0
Data 139,0,0,28,0,36,0,28,0,4,0,4
Data 139,0,0,28,0,32,24,36,0,24,0,0
Data 139,0,0,16,0,16,0,56,0,16,0,12
Data 139,56,0,4,0,28,0,36,0,28,0,0
Data 139,0,0,36,0,36,0,56,0,32,0,32
Data 139,0,0,8,0,8,0,24,0,0,0,8
Data 139,24,0,4,0,4,0,12,0,0,0,4
Data 139,0,0,20,0,24,0,24,0,20,0,16
Data 139,0,0,28,0,8,0,8,0,8,0,24
Data 139,0,0,34,0,42,0,42,0,54,0,0
Data 139,0,0,36,0,36,0,36,0,56,0,0
Data 139,0,0,24,0,36,0,36,0,24,0,0
Data 139,32,0,32,0,56,0,36,0,56,0,0
Data 139,4,0,4,0,28,0,36,0,28,0,0
Data 139,0,0,16,0,16,0,24,0,20,0,0
Data 139,0,0,56,0,4,24,0,32,28,0,0
Data 139,0,0,12,0,8,0,28,0,8,0,8
Data 139,0,0,28,0,36,0,36,0,36,0,0
Data 139,0,0,24,0,36,0,36,0,36,0,0
Data 139,0,0,20,0,42,0,42,0,34,0,0
Data 139,0,0,20,0,8,0,8,0,20,0,0
Data 139,16,0,8,0,28,0,20,0,20,0,0
Data 139,0,0,60,0,16,0,8,0,60,0,0
Data 139,0,0,26,36,0,28,0,4,56,0,36
Data 139,0,0,24,0,36,0,36,0,24,0,36
Data 139,0,0,28,0,36,0,36,0,0,0,36
Data 139,0,64,0,88,4,68,8,68,0,68,56