'=========================================================================== ' Subject: EASY HTML READER Date: 05-28-97 (19:51) ' Author: James H. McKenzie Code: QB, QBasic, PDS ' Origin: mckenzie@calwest.net Packet: HTML.ABC '=========================================================================== DECLARE SUB setup () DECLARE SUB MENU () DECLARE SUB nest () DECLARE SUB rightclick () DEFINT A-Z DECLARE SUB mouse (cx, dx, bx) DECLARE SUB MousePointer (SW) SCREEN 12 DIM SHARED a(9) 'Set up array for code DEF SEG = VARSEG(a(0)) 'Get array segment (nnnn: ) ' (two 8 bit) FOR I = 0 TO 17 'length of DATA to READ r 'read POKE VARPTR(a(0)) + I, r 'into array/2 (nnnn:iiii) (one 8 bit) NEXT I 'until 17 DATA &HB8,&H00,&H00 : ' mov AX,[n] [Swap code-(L),(H)] in AX DATA &H55 : ' push BP Save BP DATA &H8B,&HEC : ' mov BP,SP Get BP to (variable) Seg DATA &HCD,&H33 : ' int 33 Interrupt 33 DATA &H92 : ' xchg AX,[reg] [Swap code-reg] in AX DATA &H8B,&H5E,&H06 : ' mov BX,[BP+6] Point to (variable) DATA &H89,&H07 : ' mov [BX],AX Put AX in (variable) DATA &H5D : ' pop BP Restore BP DATA &HCA,&H02,&H00 : ' ret 2 Far return start: CALL MousePointer(1) 'turn pointer on CALL MousePointer(3) 'Get coordinates CLS LINE (0, 0)-(640, 480), 8, BF LINE (155, 100)-(431, 298), 7, BF CIRCLE (353, 209), 49, 15 PAINT (353, 209), 15, 15 CIRCLE (353, 209), 49, 8, , , 2 CIRCLE (353, 209), 49, 8, , , 0 CIRCLE (353, 209), 49, 8, , , 1000 CIRCLE (353, 165), 24, 8, 3, 0, .25 CIRCLE (353, 253), 24, 8, 0, 3, .25 FOR counter = 0 TO 1 FOR x% = 304 + counter TO 402 STEP 2 FOR y% = 160 + counter TO 258 STEP 2 LINE (x%, y%)-(x%, y%), 7 NEXT y% NEXT x% NEXT counter LINE (157, 102)-(428, 117), 1, BF LINE (153, 100)-(155, 298), 15, BF LINE (155, 98)-(431, 100), 15, BF LINE (430, 100)-(431, 298), 0, BF LINE (155, 296)-(431, 298), 0, BF LINE (92, 0)-(640, 15), 1, BF COLOR 7 LOCATE 1, 1 PRINT "Choose File" LOCATE 3, 1 PRINT "Print File" LOCATE 5, 1 PRINT "Help" LOCATE 7, 1 PRINT "Exit" LOCATE 9, 1 PRINT "Easy Html" LOCATE 10, 1 PRINT "Main Menu" FOR x% = 0 TO 92 FOR y% = 0 TO 110 IF POINT(x%, y%) = 7 THEN LINE (x% + 173, y% + 141)-(x% + 173, y% + 141), 8 NEXT y% NEXT x% FOR x% = 0 TO 72 FOR y% = 129 TO 144 IF POINT(x%, y%) = 7 THEN LINE (2 * x% + 208, y% - 127)-(2 * x% + 209, y% - 127), 15, BF NEXT y% NEXT x% FOR x% = 0 TO 72 FOR y% = 144 TO 169 IF POINT(x%, y%) = 7 THEN LINE (x% + 231, y% - 42)-(x% + 231, y% - 42), 15, BF NEXT y% NEXT x% LINE (0, 0)-(92, 169), 8, BF LINE (92, 0)-(0, 15), 1, BF DO key$ = INKEY$ IF key$ = CHR$(27) THEN SYSTEM CALL mouse(cx, dx, bx) IF cx > 136 AND cx < 159 AND dx > 165 AND dx < 271 THEN LINE (165, 136)-(165, 159), 15 LINE (165, 136)-(271, 136), 15 LINE (165, 159)-(271, 159), 0 LINE (271, 136)-(271, 159), 0 FOR x% = 173 TO 259 FOR y% = 143 TO 152 IF POINT(x%, y%) = 8 THEN LINE (x%, y%)-(x%, y%), 9 NEXT y% NEXT x% DO WHILE cx > 136 AND cx < 159 AND dx > 165 AND dx < 271 AND bx = 1 CALL mouse(cx, dx, bx) LINE (165, 136)-(165, 159), 0 LINE (165, 136)-(271, 136), 0 LINE (165, 159)-(271, 159), 15 LINE (271, 136)-(271, 159), 15 IF bx = 0 THEN GOTO choose LOOP ELSE FOR x% = 173 TO 259 FOR y% = 143 TO 152 IF POINT(x%, y%) = 9 THEN LINE (x%, y%)-(x%, y%), 8 NEXT y% NEXT x% LINE (165, 136)-(165, 159), 7 LINE (165, 136)-(271, 136), 7 LINE (165, 159)-(271, 159), 7 LINE (271, 136)-(271, 159), 7 END IF IF cx > 160 AND cx < 192 AND dx > 165 AND dx < 271 THEN LINE (165, 169)-(271, 169), 15 LINE (165, 169)-(165, 191), 15 LINE (271, 191)-(271, 169), 0 LINE (271, 191)-(165, 191), 0 FOR x% = 173 TO 251 FOR y% = 169 TO 191 IF POINT(x%, y%) = 8 THEN LINE (x%, y%)-(x%, y%), 9 NEXT y% NEXT x% DO WHILE cx > 160 AND cx < 192 AND dx > 165 AND dx < 271 AND bx = 1 CALL mouse(cx, dx, bx) LINE (165, 169)-(271, 169), 0 LINE (165, 169)-(165, 191), 0 LINE (271, 191)-(271, 169), 15 LINE (271, 191)-(165, 191), 15 IF bx = 0 THEN GOTO printer LOOP ELSE FOR x% = 173 TO 251 FOR y% = 169 TO 191 IF POINT(x%, y%) = 9 THEN LINE (x%, y%)-(x%, y%), 8 NEXT y% NEXT x% LINE (165, 169)-(271, 169), 7 LINE (165, 169)-(165, 191), 7 LINE (271, 191)-(271, 169), 7 LINE (271, 191)-(165, 191), 7 END IF IF cx > 201 AND cx < 232 AND dx > 165 AND dx < 271 THEN LINE (165, 202)-(165, 223), 15 LINE (165, 202)-(271, 202), 15 LINE (165, 223)-(271, 223), 0 LINE (271, 202)-(271, 223), 0 FOR x% = 173 TO 203 FOR y% = 202 TO 223 IF POINT(x%, y%) = 8 THEN LINE (x%, y%)-(x%, y%), 9 NEXT y% NEXT x% DO WHILE cx > 201 AND cx < 232 AND dx > 165 AND dx < 271 AND bx = 1 CALL mouse(cx, dx, bx) LINE (165, 202)-(165, 223), 0 LINE (165, 202)-(271, 202), 0 LINE (165, 223)-(271, 223), 15 LINE (271, 202)-(271, 223), 15 IF bx = 0 THEN GOTO HELP LOOP ELSE FOR x% = 173 TO 203 FOR y% = 202 TO 223 IF POINT(x%, y%) = 9 THEN LINE (x%, y%)-(x%, y%), 8 NEXT y% NEXT x% LINE (165, 202)-(165, 223), 7 LINE (165, 202)-(271, 202), 7 LINE (165, 223)-(271, 223), 7 LINE (271, 202)-(271, 223), 7 END IF IF cx > 234 AND cx < 255 AND dx > 165 AND dx < 271 THEN LINE (165, 234)-(165, 255), 15 LINE (165, 234)-(271, 234), 15 LINE (165, 255)-(271, 255), 0 LINE (271, 234)-(271, 255), 0 FOR x% = 173 TO 203 FOR y% = 234 TO 255 IF POINT(x%, y%) = 8 THEN LINE (x%, y%)-(x%, y%), 9 NEXT y% NEXT x% DO WHILE cx > 234 AND cx < 255 AND dx > 165 AND dx < 271 AND bx = 1 CALL mouse(cx, dx, bx) LINE (165, 234)-(165, 255), 0 LINE (165, 234)-(271, 234), 0 LINE (165, 255)-(271, 255), 15 LINE (271, 234)-(271, 255), 15 IF bx = 0 THEN GOTO printer LOOP ELSE FOR x% = 173 TO 203 FOR y% = 234 TO 255 IF POINT(x%, y%) = 9 THEN LINE (x%, y%)-(x%, y%), 8 NEXT y% NEXT x% LINE (165, 234)-(165, 255), 7 LINE (165, 234)-(271, 234), 7 LINE (165, 255)-(271, 255), 7 LINE (271, 234)-(271, 255), 7 END IF LOOP printer: printjob = 1 choose: CLS LINE (0, 0)-(640, 480), 8, BF LINE (85, 100)-(501, 228), 7, BF LINE (83, 100)-(85, 228), 15, BF LINE (85, 98)-(501, 100), 15, BF CIRCLE (353, 209), 49, 15 PAINT (353, 209), 15, 15 CIRCLE (353, 209), 49, 8, , , 2 CIRCLE (353, 209), 49, 8, , , 0 CIRCLE (353, 209), 49, 0, , , 500 CIRCLE (353, 165), 24, 8, 3, 0, .25 CIRCLE (353, 253), 24, 8, 0, 3, .25 FOR counter = 0 TO 1 FOR x% = 304 + counter TO 402 STEP 2 FOR y% = 160 + counter TO 258 STEP 2 LINE (x%, y%)-(x%, y%), 7 NEXT y% NEXT x% NEXT counter LINE (500, 100)-(501, 228), 0, BF LINE (85, 226)-(501, 228), 0, BF LINE (0, 229)-(640, 480), 8, BF LINE (87, 102)-(498, 117), 1, BF COLOR 12 PRINT "Filename with extention and path." FOR x% = 0 TO 260 FOR y% = 0 TO 15 IF POINT(x%, y%) = 12 THEN LINE (x% + 140, y% + 103)-(x% + 140, y% + 103), 15 NEXT y% NEXT x% LINE (0, 0)-(640, 15), 1, BF IF printjob = 0 THEN PRINT "Open" IF printjob = 1 THEN PRINT "Print" FOR x% = 0 TO 38 FOR y% = 16 TO 30 IF POINT(x%, y%) = 12 THEN LINE (2 * x% + 230, y% - 16)-(2 * x% + 231, y% - 16), 15 NEXT y% NEXT x% LINE (0, 16)-(39, 31), 8, BF LOCATE 11, 17 PRINT "hi" LINE (127, 159)-(127, 176), 0 LINE (127, 159)-(445, 159), 0 LINE (127, 176)-(445, 176), 15 LINE (445, 176)-(445, 159), 15 LINE (128, 160)-(444, 175), 0, BF LOCATE 11, 17 INPUT fylename$ IF printjob = 1 THEN CLOSE #1 OPEN fylename$ FOR INPUT AS #1 FOR x = 1 TO 200 LINE INPUT #1, a$ IF (EOF(1)) THEN GOTO printfound NEXT x printfound: CLOSE #1 LINE (85, 300)-(501, 375), 7, BF LINE (85, 300)-(501, 300), 15, BF LINE (85, 300)-(85, 375), 15, BF LINE (85, 375)-(501, 375), 0, BF LINE (501, 300)-(501, 375), 0, BF LINE (87, 302)-(498, 315), 1, BF LINE (97, 335)-(488, 355), 0, BF LINE (488, 355)-(97, 355), 15 LINE (488, 355)-(488, 335), 15 LOCATE 1, 1 PRINT "Status" FOR x% = 0 TO 48 FOR y% = 0 TO 12 IF POINT(x%, y%) = 12 THEN LINE (x% + 252, y% + 301)-(x% + 252, y% + 301), 15 NEXT y% NEXT x% LINE (0, 0)-(48, 15), 1, BF OPEN fylename$ FOR INPUT AS #1 FOR number = 1 TO x status = x / 351 * number LINE (status + 97, 335)-(status + 97 + x / 351, 354), 12, BF LINE INPUT #1, a$ LPRINT a$ NEXT number CLOSE #1 GOTO start END IF CLS linenumber = 1 begin: LINE (9, 33)-(640, 412), 0, BF COLOR 12 COLOR 13 OPEN fylename$ FOR INPUT AS #1 textline = 0 FOR x = 1 TO 200 LINE INPUT #1, a$ IF x > linenumber AND x < linenumber + 9 THEN IF printer = 1 THEN LPRINT a$ LPRINT "" LPRINT "" LPRINT "" END IF textline = textline + 1 LOCATE textline * 3, 2 PRINT a$ END IF IF (EOF(1)) THEN GOTO finished NEXT x finished: IF linenumber = 1 THEN setup LINE (0, 34)-(9, 416), 0, BF IF printer = 1 THEN LOCATE 1, 2 COLOR 15 PRINT " P R I N T " END IF IF linenumber = 1 THEN LINE (243, 0)-(247, 15), 1, BF PRINT fylename$ LINE (248 + LEN(fylename$) * 8, 0)-(248 + LEN(fylename$) * 8 + 5, 15), 1, BF END IF COLOR 7 LOCATE 28, 59 PRINT linenumber printer = 0 placement = linenumber / (x - 13) * 369 MOD 369 + 31 LINE (0, placementold)-(8, placementold + .1 * x), 0, BF LINE (0, placement)-(8, placement + .1 * x), 7, BF CLOSE #1 placementold = placement DO CALL mouse(cx, dx, bx) key$ = INKEY$ IF key$ = "2" AND linenumber < x - 15 THEN linenumber = linenumber + 1 IF key$ = "8" AND linenumber > 0 THEN linenumber = linenumber - 1 IF key$ = "3" AND linenumber + 14 < x - 15 THEN linenumber = linenumber + 14 IF key$ = "9" AND linenumber - 14 > 0 THEN linenumber = linenumber - 14 IF key$ = "p" THEN printer = 1 IF key$ = CHR$(27) THEN SYSTEM IF key$ <> "" THEN GOTO begin IF cx > 16 AND cx < 31 AND dx > 0 AND dx < 10 AND linenumber > 0 AND bx = 1 THEN linenumber = linenumber - 1 IF cx > 409 AND cx < 424 AND dx > 0 AND dx < 10 AND linenumber > 0 AND linenumber < x - 15 AND bx = 1 THEN linenumber = linenumber + 1 IF cx > 52 AND cx < 409 AND dx > 0 AND dx < 10 THEN linenumber = (x / 369) * (cx - 45) MOD 300 IF cx > 430 AND cx < 449 AND dx > 10 AND dx < 112 THEN LOCATE 28, 4 COLOR 9 PRINT "Main Menu" DO WHILE cx > 430 AND cx < 449 AND dx > 10 AND dx < 112 CALL mouse(cx, dx, bx) IF bx = 1 THEN GOTO start LOOP ELSE LOCATE 28, 4 COLOR 7 PRINT "Main Menu" END IF IF cx > 430 AND cx < 449 AND dx > 112 AND dx < 194 THEN LOCATE 28, 18 COLOR 9 PRINT "Print" DO WHILE cx > 430 AND cx < 449 AND dx > 112 AND dx < 194 CALL mouse(cx, dx, bx) IF bx = 1 THEN GOTO start LOOP ELSE LOCATE 28, 18 COLOR 7 PRINT "Print" END IF IF cx > 430 AND cx < 449 AND dx > 194 AND dx < 265 THEN LOCATE 28, 28 COLOR 9 PRINT "Help" DO WHILE cx > 430 AND cx < 449 AND dx > 194 AND dx < 265 CALL mouse(cx, dx, bx) IF bx = 1 THEN GOTO HELP LOOP ELSE LOCATE 28, 28 COLOR 7 PRINT "Help" END IF IF cx > 430 AND cx < 449 AND dx > 265 AND dx < 338 THEN LOCATE 28, 37 COLOR 9 PRINT "Exit" DO WHILE cx > 430 AND cx < 449 AND dx > 265 AND dx < 338 CALL mouse(cx, dx, bx) IF bx = 1 THEN SYSTEM LOOP ELSE LOCATE 28, 37 COLOR 7 PRINT "Exit" END IF IF bx <> 0 THEN GOTO begin LOOP END ender: SYSTEM HELP: CLS LINE (0, 0)-(640, 480), 8, BF LINE (20, 20)-(620, 460), 7, BF LINE (20, 20)-(620, 460), 7, BF LINE (20, 20)-(620, 20), 15 LINE (20, 20)-(20, 460), 15 LINE (22, 22)-(618, 37), 1, BF COLOR 15 PRINT "HELP" FOR x = 0 TO 30 FOR y = 0 TO 12 IF POINT(x, y) = 15 THEN LINE (2 * x + 257, y + 23)-(2 * x + 258, y + 23), 15 NEXT y NEXT x x1 = 10 help1: LINE (32, 47)-(610, 450), 0, BF LINE (600, 47)-(610, 450), 8, BF status = (450 - 47) / (x1 - 26) * linenumber1 LINE (600, status + 47)-(610, status + 47 + .1 * x1), 15, BF OPEN "c:\help.txt" FOR INPUT AS #1 textline1 = 0 FOR x1 = 1 TO 200 LINE INPUT #1, a$ IF x1 > linenumber1 AND x1 < linenumber1 + 26 THEN textline1 = textline1 + 1 LOCATE textline1 + 3, 5 COLOR 15 PRINT a$ END IF IF (EOF(1)) THEN GOTO areturn NEXT x1 areturn: CALL mouse(cx, dx, bx) LOCATE 1, 1 PRINT cx; dx CLOSE #1 key$ = INKEY$ IF key$ = "8" AND linenumber1 > 0 THEN linenumber1 = linenumber1 - 1 IF key$ = "2" AND linenumber1 < x1 - 26 THEN linenumber1 = linenumber1 + 1 IF key$ <> "" THEN GOTO help1 IF key$ = CHR$(29) THEN GOTO start IF bx = 3 THEN SYSTEM GOTO areturn SUB HELP CLS LINE (0, 0)-(640, 480), 8, BF LINE (20, 20)-(620, 460), 7, BF LINE (20, 20)-(620, 460), 7, BF LINE (20, 20)-(620, 20), 15 LINE (20, 20)-(20, 460), 15 SYSTEM END SUB SUB mouse (cx, dx, bx) POKE VARPTR(a(4)), &H92 'Swap code,Get CX setup CALL absolute(cx, VARPTR(a(0))) 'Run Code cx = cx 'Adjust 25x80 POKE VARPTR(a(4)), &H91 'Swap code,Get DX setup CALL absolute(dx, VARPTR(a(0))) 'Run Code dx = dx 'Adjust 25x80 POKE VARPTR(a(4)), &H93 'Swap code,Get BX setup CALL absolute(bx, VARPTR(a(0))) 'Run Code END SUB SUB MousePointer (SW) POKE VARPTR(a(0)) + 1, SW CALL absolute(C, VARPTR(a(0))) 'Run Code END SUB SUB setup LOCATE 28, 1 COLOR 7 PRINT " Main Menu Print Help Exit Line number: " COLOR 15 LOCATE 28, 15 PRINT "³" LOCATE 28, 25 PRINT "³" LOCATE 28, 34 PRINT "³" LOCATE 28, 43 PRINT "³" LOCATE 1, 1 COLOR 15 PRINT " " LOCATE 1, 32 LINE (0, 7)-(640, 8), 1, BF LINE (0, 14)-(0, 31), 15 LINE (0, 14)-(9, 14), 15 LINE (0, 418)-(0, 434), 15 LINE (0, 418)-(8, 418), 15 LINE (1, 15)-(8, 30), 7, BF LINE (1, 419)-(8, 434), 7, BF LINE (2, 29)-(7, 29), 0 LINE (2, 29)-(4, 17), 0 LINE (7, 29)-(4, 17), 0 LINE (2, 421)-(7, 421), 0 LINE (2, 421)-(4, 432), 0 LINE (7, 421)-(4, 432), 0 PAINT (6, 423), 0, 0 PAINT (5, 28), 0, 0 END SUB ' ----------------------------------end of code '----------------------------------beginning of text file '° From the maker of Nothing Else.... '°° DúIúGúIúTúAúL RúEúAúLúIúTúY (tm) (yes, I did) '±°° Presents... '±±°° ÜÛÛÛÛÛÜ '²±±°° ÛÛß '²²±±°° ÜÜß Asy Html Reader 'Û²²±±°° ÛÛÜ 'ÛÛ²²±±°° ßÛÛÛÛÛß 'ÛÛÛ²²±±°° 'ÛÛÛÛ²²±±°° ' ' +------------------------------------------------------------------+ ' | Don't you hate having to scroll horizontally when you read html | ' +------------------------------------------------------------------+ ' ' I've already done the complicated stuff ' With the Windows 97 like GUI ' and very quick responses this program is a must ' for well, pretty much anyone who has ever read html ' ' I think the program is very self explanitory, ' that's how it was designed ' But I'll give you the specs... ' ' ú You Must have a EGA or better ' ú You Must have a mouse of a compatible pointing device ' ú I recommend at least a pentium for smooth performance. ' 'If you are slow 'or just computer illiterate 'and have questions 'you can Email me at the following address: ' Mckenzie@Calwest.com 'If you actually use this program 'then you must have an Internet connection 'So my regular mailing address would be Useless. '-----------------------EOF