=========================================================================== BBS: The Abacus * HST/DS * Potterville MI Date: 05-17-93 (12:46) Number: 42 From: CORIDON HENSHAW Refer#: NONE To: ALL Recvd: NO Subj: (1) Assorted text scrolli Conf: (35) Quick Basi --------------------------------------------------------------------------- Here's some text scrolling code that I've been working on. Also included is a t extwraper and a centering SUB. Total: 6 messages @ 85 lines =====================================>SNIP<================================= 'This file created by PostIt! v7.0CH. '>>> Start of page 1. DEFINT A-Z DECLARE SUB Chirp () DECLARE FUNCTION Center$ (Text$) DECLARE FUNCTION NoteParse% (Numlines%, P$()) DECLARE FUNCTION ScrollMenu% (TextBuffer() AS STRING, StartLine%,_ StartCol%, EndLine%, EndCol%, FG%, BG%, BFG%, BBG%) DECLARE FUNCTION TagMenu% (TextBuffer() AS STRING, StartLine%,_ StartCol%, EndLine%, EndCol%, FG%, BG%, BFG%, BBG%, TaggedList%(),_ MaxEntrys%) FUNCTION Center$ (Text$) Center$ = STRING$((80 - LEN(Text$)) \ 2, " ") + Text$ END FUNCTION SUB Chirp SOUND 80, 2 SOUND 180, 1 END SUB FUNCTION NoteParse (Numlines, P$()) IF Numlines = 0 THEN EXIT FUNCTION El = 1 DO L$ = RTRIM$(P$(El)) IF LEN(L$) > 79 THEN ' 62 is the wrap point here FOR P = 79 TO 1 STEP -1 IF INSTR(",. ", MID$(L$, P, 1)) > 0 THEN IF LTRIM$(RTRIM$(P$(El + 1))) = "" THEN FOR I = Numlines TO El + 1 STEP -1 P$(I + 1) = P$(I) NEXT Numlines = Numlines + 1 ELSE IF El + 1 > Numlines THEN Numlines = Numlines +_ 1 END IF P$(El + 1) = RTRIM$(MID$(L$, P + 1)) + " " + P$(El_ + 1) P$(El) = RTRIM$(LEFT$(L$, P)) EXIT FOR END IF NEXT P ELSE 'P$(El) = S$ END IF El = El + 1 LOOP UNTIL El > Numlines NoteParse = Numlines END FUNCTION FUNCTION ScrollMenu (TextBuffer() AS STRING, StartLine, StartCol,_ EndLine, EndCol, FG, BG, BFG, BBG) BaseLine = StartLine BarLine = StartLine ExitFlag = -1 TopBound = UBOUND(TextBuffer) LowerBound = LBOUND(TextBuffer) SCRNWidth = EndCol - StartCol + 1 TotalLines = EndLine - StartLine + 1 GOSUB UpdateScroll DO DO Ikey$ = INKEY$ LOOP UNTIL Ikey$ <> "" SELECT CASE Ikey$ CASE CHR$(0) + "P"'Down BarLine = BarLine + 1 IF BarLine > TotalLines THEN BaseLine = BaseLine + 1 BarLine = EndLine IF BaseLine > TopBound - TotalLines THEN BaseLine = TopBound - TotalLines Chirp ELSE '>>> See Next Page >>> --- GEcho 1.00 * Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 575 950 203/23 209/209 SEEN-BY: 261/1023 280/1 390/1 396/1 15 397/2 2230/100 2440/5 3603/20