5 REM MIGHTY MAILER 10 REM BY PHILIP BATE, Ph.D. 15 REM EXTENSION ROUTINES BY BOB KLEMENC 20 REM (c) 1987, ANTIC PUBLISHING 30 FILELEN=FRE(0)-1100:DIM FILE$(FILELEN) 40 DIM SUB$(255),RAND$(260),FILENAME$(14),EOL$(2),IO$(7),MSG1$(28),MSG2$(24),MSG3$(146) 41 DIM AT$(1):AT$="@" 60 MSG3$="Press '�' to print envelopes or '�' to print addressee on letter, or '�' to print addressee & @ data" 61 MSG3$(LEN(MSG3$)+1)=". BE SURE PRINTER IS READY" 370 START=RAND+2:GOSUB 1120:GOSUB 1191 410 IF A=32 OR A=65 OR A=69 OR A=84 THEN 370 1040 IF A=69 OR A=65 OR A=84 THEN GOSUB 1220 1191 AT=0:AT=USR(ML,ADR(FILE$),LEN(FILE$),ADR(AT$),LEN(AT$),START) 1192 IF AT=0 OR AT>RAND THEN AT=RAND 1230 ? CHR$(27);CHR$(195);"I/O ERROR #";PEEK(195):TRAP 40000:CLOSE #4:FOR D=1 TO 250:NEXT D:GOTO 130 1240 IF A=69 THEN ? #4;CHR$(27);"M";CHR$(40);FILE$(START,AT-1):? #4;CHR$(27);"M";CHR$(0):CLOSE #4:RETURN 1250 IF A=65 THEN PRINT #4;CHR$(27);"M";CHR$(10);FILE$(START,AT-1):? #4;CHR$(27);"M";CHR$(0):CLOSE #4:RETURN 1251 IF A=84 THEN PRINT #4;CHR$(27);"M";CHR$(10);FILE$(START,RAND+1);CHR$(27);"M";CHR$(0):CLOSE #4:RETURN
Back to previous page