home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / prt / banner.200 < prev    next >
Text File  |  2006-10-19  |  3KB  |  68 lines

  1. 10 'Characters 32-255 start at 36963, 8 bytes per character
  2. 20 CLS:PRINT"     BANNER.200 by Joe Wasserman":PRINT
  3. 30 MAXFILES=2
  4. 40 'Maximum length of headline = 13 characters
  5. 50 A$="B":INPUT"B>anner H>eadline(Enter for Banner)";A$:IFINSTR("BbHh",A$)=0THEN50
  6. 60 IFA$="h"ORA$="b"THENA$=CHR$(ASC(A$)-32)
  7. 70 IFA$="B"THEN90
  8. 80 PRINT:PRINT"For best results - set your printer to  print 12 lines/inch"
  9. 90 PRINT:FILES:PRINT:LINEINPUT"Input file? ";F1$:IFF1$=""THEN90
  10. 100 PRINT:LINEINPUT"Output file (ENTER for LPT:)? ";F2$:IFF2$=""THENF2$="LPT:"
  11. 110 IFLEN(F2$)=3THENF2$=F2$+":"
  12. 120 IFA$="H"THENH=1:W=1ELSEH=10:W=6
  13. 130 'Width expansion on headlines limited by number of characters in file. Program will not let you use too wide an expansion.
  14. 140 PRINT:PRINT"Height expansion (ENTER for"H")";:INPUTH:PRINT"Width expansion (ENTER for "W")";:INPUTW
  15. 150 'Character used for printing must be one that your printer can print
  16. 160 'It might  not look on the printer like it does on the screen
  17. 170 'For headlines CHR$(239) is a good character for easy readability
  18. 180 CLS:C$="":L2$=" ":INPUT "Character to use for printing (ENTER to print each character with itself)";C$
  19. 190 IF LEN(C$)>1THENC$=LEFT$(C$,1)
  20. 200 'If using inverse, insert chr$(233) at beginning of text file to create left side border
  21. 210 N$="N":PRINT:INPUT"N>ormal I>nverse (ENTER for Normal)";N$:IFINSTR("NnIi",N$)=0THEN210
  22. 220 IFLEN(N$)>1THENN$=LEFT$(N$,1)
  23. 230 M=0:PRINT:INPUT"Left Margin (ENTER to center)";M
  24. 240 IFA$="H"THEN310
  25. 250 R$="N":PRINT:PRINT"Line feed after each line":INPUT"(ENTER for No)";R$
  26. 260 R1$=LEFT$(R$,1):IF R1$="Y"ORR1$="y"THENF=1ELSEIFR1$="N"ORR1$="n"THEN F=0ELSE250
  27. 270 CLS:PRINT"If you are using the maximum width of   your printer, and your printer does an  ";
  28. 280 PRINT"automatic return at the last column,    resulting in double-spacing, answer     the next question 'Y'.
  29. 290 R$="":PRINT:INPUT"Suppress return in last column";R$
  30. 300 R1$=LEFT$(R$,1):IFR1$="Y"OR R1$="y"THENE=0ELSEIFR1$="N"ORR1$="n"THENE=1ELSE290
  31. 310 CLS:OPENF1$FORINPUTAS1:OPENF2$FOROUTPUTAS2
  32. 320 IFA$="H"THEN530
  33. 330 IFM=0THENM=40-(H*4)
  34. 340 IFEOF(1)THEN520
  35. 350 L$=INPUT$(1,1):L=ASC(L$)
  36. 360 IFL<32THENFORV=1TOW*6:GOSUB490:NEXTV:GOTO340
  37. 370 IFC$=""THENL1$=L$ELSEL1$=C$
  38. 380 IFN$="I"ORN$="i"THENL2$=L1$:L1$=" "
  39. 390 P=36970+(L-32)*8
  40. 400 FORY=0TO5
  41. 410 FORX=1TOW
  42. 420 IFM>0THENFORV=1TOM:PRINT#2," ";:NEXTV
  43. 430 FORZ=PTOP-7STEP-1
  44. 440 IFPEEK(Z)AND2^YTHENPRINT#2,STRING$(H,L1$);ELSEPRINT#2,STRING$(H,L2$);
  45. 450 NEXTZ
  46. 460 IFETHENGOSUB490
  47. 470 NEXTX,Y
  48. 480 GOTO340
  49. 490 PRINT#2,
  50. 500 IFFTHENPRINT#2,CHR$(10);
  51. 510 RETURN
  52. 520 CLOSE:END
  53. 530 LINEINPUT#1,B$:B=LEN(B$)
  54. 540 IFM=0THENM=(80-(B*W*6))/2:IFM<0THENPRINT"Expansion too wide for len. of headline":PRINT:RUN50
  55. 550 FORX=0TO7
  56. 560 FORY=1TOH
  57. 570 IFM>0THENFORU=1TOM:PRINT#2," ";:NEXTU
  58. 580 FORZ=1TOB
  59. 590 B1$=MID$(B$,Z,1):B2=ASC(B1$):P=36963+X+(B2-32)*8
  60. 600 IFC$=""THENL1$=B1$ELSEL1$=C$
  61. 610 IFN$="I"ORN$="i"THENL2$=L1$:L1$=" "
  62. 620 FORV=0TO5
  63. 630 IFPEEK(P)AND2^VTHENPRINT#2,STRING$(W,L1$);ELSEPRINT#2,STRING$(W,L2$);
  64. 640 NEXTV,Z
  65. 650 PRINT#2,
  66. 660 NEXTY,X
  67. 670 CLOSE:END
  68.