' +----------------------------------------------------------------------+ ' | - G i v e I n f o . B a s - | ' | | ' | (Version 2.0) | ' | Public Domain - FreeWare | ' +----------------------------------------------------------------------+ ' +----------------------------------------------------------------------+ ' | - ABOUT THE AUTHOR - | ' +----------------------------------------------------------------------+ ' | | ' | Hello. My name is Don Smith and I am a thirty-year retired teacher | ' | of Math/History/Spanish residing in Orange County, California. I | ' | am also a former six-year Sergeant of Marines. Who-Rah! On certain | ' | forums I am known as MarineDon. My email is: smithdonb@earthlink.net | ' | | ' +----------------------------------------------------------------------+ ' | - COPYING AND DISTIBUTING - | ' +----------------------------------------------------------------------+ ' | Since this code is public domain and freeware, anyone may freely | ' | copy and distribute it. If you use the QuickBasic code in one of | ' | your own programs, you do not have to cite my name as the author, | ' | and you may even change its name. | ' +----------------------------------------------------------------------+ ' | GiveInfo.Exe is a program which is used interactively with a batch | ' | file. Two parameters are needed. The first parameter begins with | ' | a five-key switch. The first key of this switch begins with /x | ' | (to load executable) or /q (to give Y/N question) or /p (use types | ' | in a password). Key 2 is color box, key 3 is bell sounds, key 4 & 5| ' | clear ahead and after with color. The second parameter is the name | ' | of executable (if /x) or the password (if /p). The third parameter | ' | is always a message with prompts the user for input. | ' +--------------------------------+-------------------------------------+ ' | Author : Don Smith | Email: smithdonb@earthlink.net | ' +--------------------------------+-------------------------------------+ ' | | ' | Compile Info: | ' | ------------ | ' | BC : GiveInfo | ' | LINK: GiveInfo GiveIHelp GIHelp2 | ' | Lib : pro pdq | ' | | ' | Practice: | ' | -------- | ' | GIVEINFO /qa--- #1 /x /box a. continue [F1]. quit [esc] | ' | GIVEINFO /qb--- #1 /x /box b. continue [F1]. quit [esc] | ' | GIVEINFO /qc--- #1 /x /box c. continue [F1]. quit [esc] | ' | +-+ ' | GIVEINFO /p.b.. /go ahead /Give Password Below (type: go ahead) | ' | GIVEINFO /qoj.. /question /Password Correct! Return To Menu (Y/N)? | ' | | ' +------------------------------------------------------------------------+ DEFINT A-Z '------------------------------------------------------ DECLARE SUB OneLinePro (EdW$, EdPW$, Row%, Col%, FCol%, LenStr%, See%, TypeOfText$, Caps%, Colr%, FKey$, PassW%, ExitCode%) DECLARE SUB GIHelp (MonoCode%) DECLARE SUB GIHelp2 (MonoCode%) '------------------------------------------------------ DECLARE FUNCTION Exist% (FileName$) DECLARE FUNCTION QPTrim$ (Work$) DECLARE FUNCTION QPLeft$ (Work$, NumChars%) DECLARE FUNCTION QPRight$ (Work$, NumChars%) DECLARE FUNCTION QPMid$ (Work$, StartChar%, NumChars%) DECLARE FUNCTION QPLen% (Work$) DECLARE FUNCTION QPValI% (SomeWorks$) DECLARE FUNCTION Time2Num& (T$) DECLARE FUNCTION Monitor% () '------------------------------------------------------ Mon = Monitor% ComLine$ = COMMAND$ CALL Upper(ComLine$) IF ComLine$ = "" OR ComLine$ = "/h" OR ComLine$ = "/H" THEN CLS MonoCode% = 0 CALL GIHelp(MonoCode%) LOCATE , , 0, 0, 0 DO: LOOP WHILE INKEY$ = "" CLS MonoCode% = 0 CALL GIHelp2(MonoCode%) LOCATE , , 0, 0, 0 DO: LOOP WHILE INKEY$ = "" CLS END END IF ComLine$ = QPTrim$(ComLine$) FOR FindSlantLine% = 1 TO QPLen%(ComLine$) Slant$ = QPMid$(ComLine$, FindSlantLine, 1) IF Slant$ = "/" THEN SlantNum% = SlantNum% + 1 IF SlantNum% = 1 THEN Slant1% = FindSlantLine% ELSEIF SlantNum% = 2 THEN Slant2% = FindSlantLine% ELSEIF SlantNum% = 3 THEN Slant3% = FindSlantLine% EXIT FOR END IF END IF NEXT IF SlantNum% <> 3 THEN GOSUB bad.parameter END END IF First$ = QPMid$(ComLine$, Slant1% + 1, Slant2% - Slant1% - 1) First$ = QPTrim$(First$) FindPlus$ = First$ FOR PlusSign% = 1 TO QPLen%(FindPlus$) Plus$ = QPMid$(FindPlus$, PlusSign%, 1) IF Plus$ = "#" THEN First$ = QPLeft$(FindPlus$, QPLen%(First$) - (QPLen%(FindPlus$) - PlusSign% + 1)) First$ = QPTrim$(First$) FKey$ = QPMid$(FindPlus$, PlusSign% + 1, QPLen%(FindPlus$) - (QPLen%(FindPlus$) - PlusSign%)) FKey$ = QPTrim$(FKey$) EXIT FOR END IF NEXT Second$ = QPMid$(ComLine$, Slant2% + 1, Slant3% - Slant2% - 1) Second$ = QPTrim$(Second$) Third$ = QPMid$(ComLine$, Slant3% + 1, QPLen%(ComLine$) - Slant3%) Third$ = QPTrim$(Third$) REDIM Key$(5) FOR ReadFive% = 1 TO 5 Key$(ReadFive%) = QPMid$(First$, ReadFive%, 1) IF Key$(ReadFive%) = " " OR Key$(ReadFive%) = "" OR Key$(ReadFive%) = CHR$(255) THEN EXIT FOR END IF NEXT 'Key$(1) represents /x (executable) or /p (password) or /q (question) IF Key$(1) = "P" THEN PassWord$ = Second$ PW = 1 ELSEIF Key$(1) = "Q" THEN YN = 1 ELSEIF Key$(1) = "X" THEN 'dummy value. The ELSE below traps all other values X = 1 ELSE GOSUB bad.parameter END END IF '+------------------------------------------------------------------------+ '| Box Colors Next: | '+------------------------------------------------------------------------+ '|First Number is the foreground color and the | '|second number is the background color. | '| | '|The letters are represented by the CHR$ character A-Z. | '|An example is : IF Key$(2) = CHR$(65) THEN 'Letter A | '+------------------------------------+-----------------------------------+ '|A Black / Bright White...240, 240 |N White / Bright Blue....159, 159| '|B Black / Bright Yellow..224, 224 |O Black / Bright Blue....176, 176| '| | | '|C Yellow / Green..........46, 34 |P Yellow / Cyan...........62, 51 | '|D White / Green..........47, 34 |Q White / Cyan...........63, 51 | '|E Black / Bright Green...160, 160 | | '|G Cyan / Green..........43, 43 |R White / Bright Red.....207, 207| '| |S Black / Bright Red.....192, 192| '|F Black / Bright Purple..208, 208 |T Yellow / Red............78, 68 | '|H Cyan / Purple.........91, 85 |U White / Red............79, 68 | '|I Yellow / Purple.........94, 85 | | '|J White / Purple.........95, 85 |V Red / Black..........12, 0 | '| |W Green / Black..........10, 0 | '|K Light / Dark Blue......27, 17 |X Yellow / Black..........14, 0 | '|L Yellow / Dark Blue......30, 17 |Y White / Black..........15, 0 | '|M White / Dark Blue......31, 17 |Z Cyan / Black..........11, 0 | '+------------------------------------+---------------------------------+-+ 'Key$(2) are various query box colors from A to Z IF Mon = 1 OR Mon = 2 THEN BoxColr% = 240: ClearColr% = 240 ELSEIF Key$(2) > CHR$(64) AND Key$(2) < CHR$(91) THEN IF Key$(2) = CHR$(65) THEN 'A BoxColr% = 240: ClearColr% = 240 ELSEIF Key$(2) = CHR$(66) THEN 'B BoxColr% = 224: ClearColr% = 224 ELSEIF Key$(2) = CHR$(67) THEN 'C BoxColr% = 46: ClearColr% = 34 ELSEIF Key$(2) = CHR$(68) THEN 'D BoxColr% = 47: ClearColr% = 34 ELSEIF Key$(2) = CHR$(69) THEN 'E BoxColr% = 160: ClearColr% = 160 ELSEIF Key$(2) = CHR$(70) THEN 'F BoxColr% = 43: ClearColr% = 43 ELSEIF Key$(2) = CHR$(71) THEN 'G BoxColr% = 208: ClearColr% = 208 ELSEIF Key$(2) = CHR$(72) THEN 'H BoxColr% = 91: ClearColr% = 85 ELSEIF Key$(2) = CHR$(73) THEN 'I BoxColr% = 94: ClearColr% = 85 ELSEIF Key$(2) = CHR$(74) THEN 'J BoxColr% = 95: ClearColr% = 85 ELSEIF Key$(2) = CHR$(75) THEN 'K BoxColr% = 27: ClearColr% = 17 ELSEIF Key$(2) = CHR$(76) THEN 'L BoxColr% = 30: ClearColr% = 17 ELSEIF Key$(2) = CHR$(77) THEN 'M BoxColr% = 31: ClearColr% = 17 ELSEIF Key$(2) = CHR$(78) THEN 'N BoxColr% = 159: ClearColr% = 159 ELSEIF Key$(2) = CHR$(79) THEN 'O BoxColr% = 176: ClearColr% = 176 ELSEIF Key$(2) = CHR$(80) THEN 'P BoxColr% = 62: ClearColr% = 51 ELSEIF Key$(2) = CHR$(81) THEN 'Q BoxColr% = 63: ClearColr% = 51 ELSEIF Key$(2) = CHR$(82) THEN 'R BoxColr% = 207: ClearColr% = 207 ELSEIF Key$(2) = CHR$(83) THEN 'S BoxColr% = 192: ClearColr% = 192 ELSEIF Key$(2) = CHR$(84) THEN 'T BoxColr% = 78: ClearColr% = 68 ELSEIF Key$(2) = CHR$(85) THEN 'U BoxColr% = 79: ClearColr% = 68 ELSEIF Key$(2) = CHR$(86) THEN 'V BoxColr% = 12: ClearColr% = 0 ELSEIF Key$(2) = CHR$(87) THEN 'W BoxColr% = 10: ClearColr% = 0 ELSEIF Key$(2) = CHR$(88) THEN 'X BoxColr% = 14: ClearColr% = 0 ELSEIF Key$(2) = CHR$(89) THEN 'Y BoxColr% = 15: ClearColr% = 0 ELSEIF Key$(2) = CHR$(90) THEN 'Z BoxColr% = 11: ClearColr% = 0 END IF ELSEIF Key$(2) = "." OR Key$(2) = "+" OR Key$(2) = "-" OR Key$(2) = "" OR Key$(2) = " " THEN BoxColr% = 240: ClearColr% = 240 END IF 'Key$(3) are 10 bell sounds IF Key$(3) = "+" THEN Bell% = 1 ELSEIF Key$(3) > CHR$(64) AND Key$(3) < CHR$(75) THEN 'A - J Bell% = ASC(Key$(3)) - 64 ELSEIF Key$(3) = "-" OR Key$(3) = "." THEN Bell% = 11 END IF 'Key$(4) clears ahead of query box with a color IF Key$(4) = "+" THEN ClearAhead = 11 'which means ClearAhead = 0 ELSEIF Key$(4) > CHR$(47) AND Key$(4) < CHR$(58) THEN '1 - 7 ClearAhead = QPValI%(Key$(4)) ELSEIF Key$(4) = "-" OR Key$(4) = "." THEN ClearAhead = 12 ELSEIF Key$(4) = "" OR Key$(4) = " " THEN ClearAhead = 12 END IF 'Key$(5) clears after with a color IF Key$(5) = "+" THEN ClearAfter = 11 ELSEIF Key$(5) > CHR$(47) AND Key$(5) < CHR$(58) THEN '1 - 7 ClearAfter = QPValI%(Key$(5)) ELSEIF Key$(5) = "-" OR Key$(5) = "." THEN ClearAfter = 12 ELSEIF Key$(5) = "" OR Key$(5) = " " THEN ClearAfter = 12 END IF next.key: IF ClearAhead > -1 AND ClearAhead < 8 THEN IF Mon = 1 OR Mon = 2 THEN COLOR , 0: CLS ELSEIF Mon > 2 THEN COLOR , ClearAhead: CLS END IF ELSEIF ClearAhead = 11 THEN CLS END IF IF ClearColr% <> 0 THEN CALL PaintBox0(11, 12, 17, 72, 8) END IF 'BoxColr% = 240: ClearColr% = BoxColr% + (BoxColr% \ 16) IF Mon = 1 OR Mon = 2 THEN BoxColr% = 240: ClearColr% = 240 END IF CALL ClearScr0(10, 10, 16, 70, ClearColr%) CALL Box0(10, 11, 16, 69, 2, BoxColr%) LOCATE 12, 11 CALL Box0(13, 14, 15, 65, 1, BoxColr%) LOCATE 12, 17, 0, 0, 0: CALL MQPrint(Third$, BoxColr%) IF Bell% > 0 AND Bell% < 11 THEN CALL Chime(Bell%) END IF LOCATE 14, 17: CALL MQPrint(SPACE$(45), BoxColr%) call.editor: IF PW = 1 THEN PassW% = 1 LenStr% = 45 ELSEIF PW = 0 THEN IF YN = 1 THEN LenStr% = 1 TypeOfText$ = "YNyn" ELSE LenStr% = 45 TypeOfText$ = "" END IF END IF 'Row% = 14: Col% = 17: FCol% = 17 'Caps% = 1: Colr% = BoxColr% ' 'CALL EditString(EdW$, Row%, Col%, FCol%, LenStr%, TypeOfText$, Caps%, Colr%, FKey$, PassW%, ExitCode%) EdW$ = "" EdPW$ = "" Row% = 14 Col% = 17 FCol% = 17 See% = 1 'wipe existing text Caps% = 1 Colr% = BoxColr% CALL OneLinePro(EdW$, EdPW$, Row%, Col%, FCol%, LenStr%, See%, TypeOfText$, Caps%, Colr%, FKey$, PassW%, ExitCode%) IF ExitCode% > 0 AND ExitCode% < 11 THEN IF ClearAfter > -1 THEN GOSUB clear.after CALL SetLevel(ExitCode%) END ELSEIF EdW$ = "" OR ExitCode% = 27 THEN IF PW = 1 THEN LOCATE 14, 17, 0, 0, 0 CALL MQPrint("Must Give Password To Proceed!" + STRING$(16, " "), BoxColr%) CALL Chime(6) CALL Pause(30) LOCATE 14, 17: CALL MQPrint(SPACE$(46), BoxColr%) GOTO call.editor ELSEIF PW = 0 THEN CALL SetLevel(27) IF ClearAfter > -1 THEN GOSUB clear.after END END IF ELSEIF ExitCode% = 13 THEN IF PW = 1 THEN IF UCASE$(EdPW$) = UCASE$(PassWord$) THEN IF ClearAfter > -1 THEN GOSUB clear.after END ELSEIF UCASE$(EdPW$) <> UCASE$(Second$) THEN CALL Chime(6) LOCATE 14, 17, 0, 0, 0 CALL MQPrint("Incorrect Password!" + STRING$(28, " "), BoxColr%) CALL Pause(30) LOCATE 14, 17: CALL MQPrint(SPACE$(45), BoxColr%) GOTO call.editor END IF ELSEIF PW = 0 THEN IF YN = 1 THEN IF EdW$ = "Y" OR EdW$ = "N" THEN ExitCode% = ASC(EdW$) CALL SetLevel(ExitCode%) IF ClearAfter > -1 THEN GOSUB clear.after END END IF ELSEIF YN = 0 THEN There = Exist%(Second$) IF Second$ = "*" THEN END ELSEIF There = -1 THEN GiveAllInfo$ = Second$ + " " + EdW$ IF ClearAfter > -1 THEN GOSUB clear.after SHELL GiveAllInfo$ END ELSEIF There = 0 THEN LOCATE 14, 17, 0, 0, 0 CALL MQPrint("Oops! Cannot find : " + Second$, BoxColr%) CALL Chime(6) CALL Pause(30) LOCATE , , 1, 6, 7 END END IF END IF ELSEIF QPLen%(EdW$) > LenStr% THEN GOTO call.editor END IF GOTO call.editor END IF press.esc: DO DO PressKey$ = INKEY$ LOOP UNTIL QPLen%(PressKey$) > 0 KeyValue% = CVI(PressKey$ + CHR$(0)) ' IF KeyValue% = 27 THEN ' RETURN END IF LOOP bad.parameter: CLS CALL Chime(1) LOCATE 1, 1: CALL MQPrint(" ", 10) LOCATE 2, 1: CALL MQPrint(" *** ERROR *** INCORRECT PARAMETERS SET. ", 10) LOCATE 3, 1: CALL MQPrint(" Type GIVEINFO /H at the command prompt to ", 10) LOCATE 4, 1: CALL MQPrint(" reach the help screen. Also, please refer ", 10) LOCATE 5, 1: CALL MQPrint(" to BeeMenu.Doc for complete information. ", 10) RETURN clear.after: IF ClearAfter > -1 AND ClearAfter < 8 THEN IF Mon = 1 OR Mon = 2 THEN COLOR , 0: CLS ELSEIF Mon > 2 THEN COLOR , ClearAfter: CLS END IF ELSEIF ClearAfter = 11 THEN CLS END IF RETURN SUB OneLinePro (EdW$, EdPW$, Row%, Col%, FCol%, LenStr%, See%, TypeOfText$, Caps%, Colr%, FKey$, PassW%, ExitCode%) STATIC ' +--------------------------------------------------------------------+ ' | SUB EditQB: | ' +--------------------------------------------------------------------+ ' | SUB EditQB is a one-line editor able to use a password, if needed.| ' +--------------------------------------------------------------------+ ' | EdW$ | The string to be edited. | ' +--------------+-----------------------------------------------------+ ' | Row% | The row to begin the editing. | ' +--------------+-----------------------------------------------------+ ' | Col% | The column to begin the editing. | ' +--------------+-----------------------------------------------------+ ' | FCol% | Use same number as Col% | ' +--------------+-----------------------------------------------------+ ' | LenStr% | Length of the string to edit. | ' +--------------+-----------------------------------------------------+ ' | See% | If See% = 0 then existing text will be displayed. | ' | | If See% = 1 existing text will be wiped. | ' +--------------+-----------------------------------------------------+ ' | TypeOfText$ | For all ASCII characers 32 to 255, TypeOfText = "" | ' | | For numbers only, TypeOfText$ = "1234567890" | ' | | For numbers with commas and decimals points, | ' | | TypeOfText$ = ".,1234567890" | ' | | For Yes or No answers, TypeOfText$ = "YNyn" | ' | | Whatever is included within the parethesis | ' | | is what will be accepted. | ' +--------------+-----------------------------------------------------+ ' | Caps% | Capital letters enabled, Caps% = 1 | ' +--------------+-----------------------------------------------------+ ' | FGColr% | Foreground color. | ' +--------------+-----------------------------------------------------+ ' | BGColr% | Background color. | ' +--------------+-----------------------------------------------------+ ' | FKey$ | Which keys to enable. To enabled | ' | | and , FKey$ = "150" ("0" is F10). | ' +--------------+-----------------------------------------------------+ ' | PassW% | PassW% = 1 password mode enabled. | ' | | PassW% = 0 password mode NOT enabled. | ' +--------------+-----------------------------------------------------+ ' | The ExitCode% is derived from the unique CVI Basic command. | ' | The ExitCode% for the keys gets changed to 101 to 110. | ' | To enable programmers to use the CVI code in their own programs, | ' | I have attached a short program, KeyCode.Bas (just below this | ' | section) | ' +--------------------------------------------------------------------+ ' | ExitCode% = 101 is F1 key | ' | ExitCode% = 102 is F2 key | ' | ExitCode% = 103 is F3 key | ' | ExitCode% = 104 is F4 key | ' | ExitCode% = 105 is F5 key | ' | ExitCode% = 106 is F6 key | ' | ExitCode% = 107 is F7 key | ' | ExitCode% = 108 is F8 key | ' | ExitCode% = 109 is F9 key | ' | ExitCode% = 110 is F10 key | ' | ExitCode% = 13 is ENTER key | ' | ExitCode% = 18432 is Up Arrow | ' | ExitCode% = 20480 is Down Arrow | ' | ExitCode% = 9 is TAB key | ' | ExitCode% = 27 is EXIT key | ' +--------------------------------------------------------------------+ ' | Please include at the top of the routine DEFINT A-Z | ' +--------------------------------------------------------------------+ ' +--------------------------------------------------------------------+ ' | Use KeyCode.Bas below to find out what the CVI numbers will be | ' | for keys you wish to trap. | ' +--------------------------------------------------------------------+ ' | ' KeyCode.Bas - By Don Smith. FreeWare and Public Domain Program. | ' | ' Date: 09/01/2002. | ' | ' +-------------------------------------------------------------+ | ' | ' | Note: To reach the extended ASCII characters 127 to 255, | | ' | ' | press down on the key, and while pressed down, | | ' | ' | type in the number on your keypad, not the numbers | | ' | ' | above then keys. | | ' | ' +-------------------------------------------------------------+ | ' +--------------------------------------------------------------------+ ' | | ' | COLOR 14, 1: CLS | ' | Top1$ = "Press a key and the KeyCode% value will be displayed." | ' | Top2$ = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" | ' | Top3$ = "(Press To Quit" | ' | COLOR 15, 1 | ' | LOCATE 2, 15: PRINT Top1$ | ' | LOCATE 3, 15: PRINT Top2$ | ' | COLOR 11, 1 | ' | LOCATE 4, 30, 0: PRINT Top3$ | ' | PRINT : PRINT | ' | COLOR 14, 1 | ' | DO | ' | DO | ' | Hit$ = INKEY$ | ' | IF Hit$ = CHR$(27) THEN | ' | PRINT | ' | LOCATE , 10: COLOR 15, 1: PRINT STRING$(62, "-"); | ' | PRINT | ' | LOCATE , 34: COLOR 11, 1: PRINT "Program Ends"; | ' | PRINT : PRINT | ' | END | ' | END IF | ' | LOOP UNTIL Hit$ <> "" | ' | Hit% = CVI(Hit$ + CHR$(0)) | ' | Key$ = STR$(Hit%) | ' | IF Hit% < 256 THEN | ' | LOCATE , 32, 0 | ' | PRINT Hit$ + SPACE$(9) + "= " + Key$ | ' | ELSEIF Hit% > 255 THEN | ' | LOCATE , 21, 0 | ' | PRINT "Extended Key" + SPACE$(9) + "= " + Key$; "" | ' | END IF | ' | LOOP | ' | | ' +--------------------------------------------------------------------+ 'COLOR FGColr%, BGColr% IF See% = 1 THEN LOCATE Row%, Col% CALL MQPrint(STRING$(LenStr%, " "), Colr%) END IF begin.edit.line: DO DO LOCATE Row%, Col%, 1, 6, 7 EdW$ = INKEY$ LOOP UNTIL LEN(EdW$) > 0 SlamKey% = CVI(EdW$ + CHR$(0)) ' IF SlamKey% > 31 AND SlamKey% < 256 THEN 'CHR$(31) to CHR$255) IF TypeOfText$ = "" THEN 'CHR$(32) is GOSUB show.char ELSEIF TypeOfText$ <> "" THEN IF INSTR(TypeOfText$, EdW$) > 0 THEN GOSUB show.char END IF END IF ELSEIF SlamKey% = 27 THEN ' Key ExitCode% = 27 GOSUB get.string EXIT SUB ELSEIF SlamKey% = 19712 THEN ' Arrow Col% = Col% + 1 IF Col% > FCol% + LenStr% - 1 THEN Col% = FCol% ELSE LOCATE Row%, Col%, 1, 6, 7 END IF ELSEIF SlamKey% = 19200 THEN ' Col% = Col% - 1 IF Col% = FCol% - 1 OR Col% < FCol% THEN Col% = FCol% + LenStr% - 1 END IF ELSEIF SlamKey% = 13 THEN ' GOSUB get.string ExitCode% = 13 EXIT SUB ' or or - If not used, REM these 3 out. ELSEIF SlamKey% = 9 OR SlamKey% = 18432 OR SlamKey% = 20480 THEN GOSUB get.string ExitCode% = SlamKey% EXIT SUB ELSEIF SlamKey% = 8 THEN ' Col% = Col% - 1 IF Col% = FCol% OR Col% < FCol% THEN Col% = FCol% END IF LOCATE Row%, Col% CALL MQPrint(" ", Colr%) EdPW$ = LEFT$(EdPW$, LEN(EdPW$) - 1) ELSEIF SlamKey% = 21248 THEN ' SaveScr$ = SPACE$((FCol% + LenStr%) - Col% + 1) FOR DelK% = Col% + 1 TO FCol% + LenStr% SaveScr$ = SaveScr$ + CHR$(SCREEN(Row%, DelK%)) NEXT SaveScr$ = RTRIM$(LTRIM$(SaveScr$)) LOCATE Row%, Col%, 1 CALL MQPrint(SaveScr$ + " ", Colr%) ELSEIF SlamKey% = 18176 THEN ' Col% = FCol% ELSEIF SlamKey% = 20224 THEN ' GOSUB get.string Col% = FCol% + LEN(EdW$) LOCATE Row%, Col%, 1, 6, 7 ELSEIF SlamKey% = 25 THEN ' = clears line of LOCATE Row%, FCol% 'all text. WipeOut$ = SPACE$(LenStr%) CALL MQPrint(WipeOut$, Colr%) ELSEIF SlamKey% > 15103 OR SlamKey% < 17409 THEN ' to IdentKey$ = STR$(((SlamKey% - 15104) \ 256) + 1) IdentKey$ = LTRIM$(RTRIM$(IdentKey$)) IF IdentKey$ = "10" THEN IdentKey$ = "0" END IF IF INSTR(FKey$, IdentKey$) > 0 THEN IF IdentKey$ = "0" THEN ExitCode% = 10 GOSUB get.string EXIT SUB ELSE ExitCode% = VAL(IdentKey$) GOSUB get.string EXIT SUB END IF END IF END IF LOOP show.char: LOCATE Row%, Col% EdPW$ = EdPW$ + CHR$(SlamKey%) COLOR FGColr%, BGColr% IF Col% = FCol% + LenStr% THEN Col% = FCol% RETURN END IF IF PassW% = 0 THEN IF Caps% > 0 THEN CALL MQPrint(UCASE$(CHR$(SlamKey%)), Colr%) ELSEIF Caps% = 0 THEN CALL MQPrint(CHR$(SlamKey%), Colr%) END IF ELSEIF PassW% = 1 THEN LOCATE Row%, Col%: CALL MQPrint("ù", Colr%) LOCATE Row%, Col% + 1, 1, 6, 7 END IF Col% = Col% + 1 RETURN get.string: EditLine$ = SPACE$(LenStr%) FOR Horizontal% = FCol% TO FCol% + LenStr% EditLine$ = EditLine$ + CHR$(SCREEN(Row%, Horizontal%)) NEXT EditLine$ = LTRIM$(RTRIM$(EditLine$)) EdW$ = EditLine$ RETURN END SUB SUB TinyBox (ULRow, ULCol, LRRow, LRCol, BoxFGColr, BoxBGColr, SingOrDoub) ' +----------------------------------------------------------------------+ ' | SUB TinyBox | ' +----------------------------------------------------------------------+ ' | ULRow = Upper Left Row. ULCol = Upper Left Column. | ' | LRRow = Lower Right Row. LRCol = Lower Right Column. | ' | BoxFGColr = The Foreground Color The Box. | ' | BoxBGColr = The Back Ground Color Of The Box. | ' | SingOrDoub = 1 (Single Line Box). SingOrDoub = 2 (Double Line Box). | ' +----------------------------------------------------------------------+ COLOR BoxFGColr, BoxBGColr IF SingOrDoub = 1 THEN LOCATE ULRow, ULCol PRINT CHR$(218) + STRING$(LRCol - ULCol, CHR$(196)) + CHR$(191); FOR BoxY = ULRow + 1 TO LRRow - 1 LOCATE BoxY, ULCol PRINT CHR$(179) + STRING$(LRCol - ULCol, " ") + CHR$(179); NEXT LOCATE LRRow, ULCol PRINT CHR$(192) + STRING$(LRCol - ULCol, CHR$(196)) + CHR$(217); ELSEIF SingOrDoub = 2 THEN LOCATE ULRow, ULCol PRINT CHR$(201) + STRING$(LRCol - ULCol, CHR$(205)) + CHR$(187); FOR BoxY = ULRow + 1 TO LRRow - 1 LOCATE BoxY, ULCol PRINT CHR$(186) + STRING$(LRCol - ULCol, " ") + CHR$(186); NEXT LOCATE LRRow, ULCol PRINT CHR$(200) + STRING$(LRCol - ULCol, CHR$(205)) + CHR$(188); END IF END SUB