BBS: Inland Empire Archive Date: 02-10-93 (12:53) Number: 316 From: CORIDON HENSHAW Refer#: NONE To: ALL Recvd: NO Subj: ELBROWSE.BAS 4/5 Conf: (2) Quik_Bas
Hello All! ===Chop=== PRINT "Search:"; SEEKGE #4, TextInput$(25, 46, 1, 20) IF NOT EOF(4) THEN ExitFlag = 5 ELSE LOCATE 25, 38 PRINT "Echo not found, press any key"; Junk$ = INPUT$(1) LOCATE 25, 38 PRINT " "; SEEKEQ #4, CurrItem$ END IF CASE "R", "r" 'Generate full information file COLOR 14, 1 LOCATE 25, 38 PRINT "Filename: "; Filename$ = UCASE$(TextInput$(25, 48, 1, 20)) IF DIR$(Filename$) = Filename$ THEN LOCATE 25, 38 PRINT "File exists. Overwrite? (N)"; DO Ikey$ = UCASE$(INKEY$) LOCATE 25, 38 + 26, 1 IF Ikey$ <> "" AND LEN(Ikey$) = 1 THEN PRINT Ikey$; ELSEIF Ikey$ = CHR$(8) THEN 'BKSPC PRINT " "; END IF LOOP UNTIL Ikey$ = "Y" OR Ikey$ = "N" LOCATE , , 0 IF Ikey$ = "N" AND Filename$ <> "CON"_ THEN LOCATE 25, 38 PRINT " "; ELSE ExitFlag = 6 CurrItem$ = Filename$ END IF ELSE ExitFlag = 6 CurrItem$ = Filename$ END IF CASE CHR$(0) + "Q" 'PGDN ExitFlag = 7 CASE CHR$(0) + "I" 'PGUP ExitFlag = 8 CASE ELSE BEEP END SELECT LOOP UNTIL ExitFlag > -1 ScrollText = ExitFlag EXIT FUNCTION UpdateScreen: EVENT OFF COLOR 7, 0 StartBuffer = BaseLine FOR X = StartLine TO EndLine LOCATE X IF StartBuffer <= UBOUND(TextBuffer) THEN PRINT TextBuffer(StartBuffer) + STRING$(80 - _ LEN(TextBuffer(StartBuffer)), " "); ELSE PRINT STRING$(80, " "); END IF StartBuffer = StartBuffer + 1 NEXT EVENT ON RETURN END FUNCTION FUNCTION TextInput$ (Row, Col, Cursor, MaxLen) LOCATE Row, Col, Cursor DO DO Ikey$ = INKEY$ LOOP UNTIL Ikey$ <> "" SELECT CASE Ikey$ CASE CHR$(0) + "M" 'Right EditPos = EditPos + 1 IF NOT EditPos < InputLength THEN EditPos = InputLength BEEP END IF LOCATE Row, Col + EditPos, Cursor CASE CHR$(0) + "K" 'Left EditPos = EditPos - 1 IF NOT EditPos > 0 THEN EditPos = 0 BEEP END IF LOCATE Row, Col + EditPos, Cursor ===Chop=== Coridon Henshaw \ Sirrus Software --- GEcho 1.00 * Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET