' +---------------------------------------------------------------------+ ' | | ' | B e e M e n u . B a s | ' | | ' | (Version 2.0) | ' | Public Domain - FreeWare | ' +---------------------------------------------------------------------+ ' +---------------------------------------------------------------------+ ' | THE BEEMENU PROGRAM WORKS INTERACTIVELY WITH A BATCH FILE. THE | ' | PARAMETERS ARE BeeMenu /b Practice.Bat /m #2 /f +5 | ' | THE /b SWITCH INDICATES THE BATCH FILE, THE /m # SWITCH INDICATES | ' | THE MENU NUMBER AND THE /f ENABLES THE F KEYS. | ' | | ' | TO READ THE DOCUMENTATION FILE, AT THE PROMPT TYPE: readme.bat | ' +---------------------------------------------------------------------+ ' +---------------------------------------------------------------------+ ' | - ABOUT THE AUTHOR - | ' +---------------------------------------------------------------------+ ' | | ' | Hello. My name is Don Smith and I am a retired thiry-year teacher | ' | of Math/History/Spanish residing in Orange County, California. I am | ' | also a former 6-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. | ' +---------------------------------------------------------------------+ ' +---------------------------------------------------------------------+ ' | Full Moon Software: | ' | ------------------- | ' | BeeMenu.Bas was written with QuickBASIC 4.5. A great assist in | ' | writing BeeMenu and compiling it were two toolboxes originally | ' | from Crescent Software. They are: QuickPak and PDQ. Crescent | ' | Software was sold to Progress Software. The original owner and | ' | programmer of Crescent Software, Ethen Winer, took back the MS-DOS | ' | toolboxes so that they still would be available to MS-DOS | ' | programmers. He now operates Full Moon Software. These two toolboxes| ' | have hundreds of routines. Using their included libraries instead | ' | of BRUN45.Lib or BCOM45.Lib and utilizing their assembly written | ' | routines, makes for an extremely tight, executable program very | ' | close to the tiny size and speed of an assembly | ' | language program. | ' | | ' | Ethan Winer's internet site: | ' | ---------------------------- | ' | http://www.ehtanwiner.com | ' | | ' | Ethan Winer's Mailing Address: | ' | ------------------------------ | ' | FULL MOON SOFTWARE | ' | 34 Cedar Vale Drive | ' | New Milford, CT 06776 | ' | | ' | (Voice) 860-350-8188 | ' | (Fax) 860-350-6130 | ' | (Email) ethan@ethanwiner.com | ' | | ' | AUTHOR: | ' | ------ | ' | My name is Don Smith and I am a retired Math/History/Spanish | ' | teacher from Orange County, California. I may be reached | ' | through Earthlink if there are questions or input: | ' | | ' | smithdonb@earthlink.net | ' +---------------------------------------------------------------------+ ' | Compile Info: | ' | ------------ | ' | BC : beemenu | ' | | ' | LINK : beemenu | ' | | ' | LIB : pro pdq | ' | | ' +---------------------------------------------------------------------+ DECLARE FUNCTION DOSError% () DECLARE FUNCTION Exist% (FileName$) DECLARE FUNCTION FCount% (FileSpec$) 'added DECLARE FUNCTION FLInput$ (Handle%, Buffer$) DECLARE FUNCTION KeyCode% () DECLARE FUNCTION LoadExec% (FileName$, CmdLine$) DECLARE FUNCTION PDQValI% (Work$) 'from pdq.lib DECLARE FUNCTION QPLeft$ (Work$, NumChars%) DECLARE FUNCTION QPMid$ (Work$, StartChar%, NumChars%) DECLARE FUNCTION QPRight$ (Work$, NumChars%) DECLARE FUNCTION QPLen% (Work$) DECLARE FUNCTION QPValI% (SomeWorks$) DECLARE FUNCTION QPValL& (SomeNumber$) 'added DECLARE FUNCTION QPStrI$ (IntVar%) DECLARE FUNCTION QPTrim$ (Works$) DECLARE FUNCTION QPLTrim$ (Works$) DECLARE FUNCTION QPRTrim$ (Works) DECLARE FUNCTION Time2Num& (T$) DECLARE FUNCTION Monitor% () Mon = Monitor% DIM Para$(3) DIM parameter$(3) ComLine$ = COMMAND$ CALL Upper(ComLine$) FOR FindSlant% = 1 TO QPLen%(ComLine$) Slant$ = QPMid$(ComLine$, FindSlant%, 1) IF Slant$ = "/" THEN ParaNum% = ParaNum% + 1 Para$(ParaNum%) = QPStrI$(FindSlant%) IF ParaNum% = 3 THEN EXIT FOR END IF END IF NEXT IF ParaNum% = 1 THEN GOSUB first.para parameter$(1) = First.1$ ELSEIF ParaNum% = 2 THEN GOSUB second.para parameter$(1) = First.1$ parameter$(2) = Second.2$ ELSEIF ParaNum% = 3 THEN GOSUB third.para parameter$(1) = First.1$ parameter$(2) = Second.2$ parameter$(3) = Third.3$ END IF FOR FindOut% = 1 TO ParaNum% IF QPLeft$(parameter$(FindOut%), 1) = UCASE$("b") THEN BatchFile$ = QPRight$(parameter$(FindOut%), QPLen%(parameter$(FindOut%)) - 1) BatchFile$ = QPTrim$(BatchFile$) ELSEIF QPLeft$(parameter$(FindOut%), 1) = UCASE$("m") THEN FirstStep$ = QPRight$(parameter$(FindOut%), QPLen%(parameter$(FindOut%)) - 1) FirstStep$ = QPTrim$(FirstStep$) IF QPLeft$(FirstStep$, 1) = "#" THEN MenuType$ = QPRight$(FirstStep$, QPLen%(FirstStep$) - 1) MenuType$ = QPTrim$(MenuType$) ELSEIF QPLeft$(FirstStep$, 1) = UCASE$("h") THEN HexMenu$ = QPRight$(FirstStep$, QPLen%(FirstStep$) - 1) HexMenu$ = QPTrim$(HexMenu$) IF Mon = 1 OR Mon = 2 THEN MenuType$ = "200" MonType = 1 ELSE MenuType$ = "-1" END IF FOR ReadHex% = 1 TO 9 STEP 2 HexValue$ = QPMid$(HexMenu$, ReadHex%, 2) IF HexValue$ = "" OR HexValue$ = " " OR HexValue$ = " " THEN MenuType$ = "0" EXIT FOR ELSEIF ReadHex% = 1 THEN BG% = PDQValI%("&H" + HexValue$)'BG%= background behind menu 'BG% = VAL("&H" + HexValue$) ELSEIF ReadHex% = 3 THEN B% = PDQValI%("&H" + HexValue$) 'b% = menu box color 'B% = VAL("&H" + HexValue$) ELSEIF ReadHex% = 5 THEN T% = PDQValI%(" &H" + HexValue$) 'T% = title color 'T% = VAL("&H" + HexValue$) ELSEIF ReadHex% = 7 THEN S% = PDQValI%("&H" + HexValue$) 'S% = select color 'S% = VAL("&H" + HexValue$) ELSEIF ReadHex% = 9 THEN MI% = PDQValI("&H" + HexValue$) 'MI% = menu item color 'MI% = VAL("&H" + HexValue$) END IF NEXT BOTT% = B% 'added 9-16-2001 CM% = B% 'CM% = clearing color END IF ELSEIF QPLeft$(parameter$(FindOut%), 1) = UCASE$("f") THEN EnableF$ = QPRight$(parameter$(FindOut%), QPLen%(parameter$(FindOut%)) - 1) EnableF$ = QPTrim$(EnableF$) IF QPLeft$(EnableF$, 1) = "#" THEN EnableF$ = QPRight$(EnableF$, QPLen%(EnableF$) - 1) EnableF$ = QPTrim$(EnableF$) EnableF% = VAL(EnableF$) YesFKeys = 1 END IF ELSEIF QPLeft$(parameter$(FindOut%), 1) = UCASE$("x") THEN XFactor = 1 END IF NEXT IF BatchFile$ = "" THEN GOTO no.batch.file END IF IsFile = FCount%(BatchFile$) IF IsFile = 0 THEN GOTO no.such.file END IF OPEN BatchFile$ FOR INPUT AS #1 CALL FOpen(BatchFile$, Handle%) IF DOSError% THEN GOTO no.such.file END IF REDIM MenuItem$(11) DO IF DOSError% THEN EXIT DO 'LINE INPUT #1, BatchFile$ Buffer$ = SPACE$(82) BatchFile$ = FLInput$(Handle%, Buffer$) BatchFile$ = QPLTrim$(BatchFile$) IF QPLeft$(BatchFile$, 2) = "::" THEN BatchFile$ = QPRight$(BatchFile$, QPLen%(BatchFile$) - 2) BatchFile$ = QPLTrim$(BatchFile$) IF QPLeft$(BatchFile$, 1) = "*" THEN EXIT DO ELSEIF QPLeft(BatchFile$, 1) = "%" THEN BatchFile$ = QPRight$(BatchFile$, QPLen(BatchFile$) - 1) BatchFile$ = QPTrim$(BatchFile$) BottomLine$ = BatchFile$ BottomLine$ = QPLeft$(BottomLine$, 80) BottomLine$ = QPTrim$(BottomLine$) LenBottom = QPLen%(BottomLine$) ELSEIF QPLeft$(BatchFile$, 1) = "$" THEN BatchFile$ = QPRight$(BatchFile$, QPLen%(BatchFile$) - 1) BatchFile$ = QPTrim$(BatchFile$) MenuTitle$ = BatchFile$ MenuTitle$ = QPLeft$(MenuTitle$, 32) MenuTitle$ = QPTrim$(MenuTitle$) LenTitle = QPLen%(MenuTitle$) ELSEIF QPLeft$(BatchFile$, 1) = "#" THEN IF MNum = 10 THEN EXIT DO END IF IF QPLeft$(BatchFile$, 2) <> "##" THEN BatchFile$ = QPRight$(BatchFile$, QPLen%(BatchFile$) - 1) BatchFile$ = QPTrim$(BatchFile$) BatchFile$ = QPLeft$(BatchFile$, 20) PNum% = PNum% + 1 IF PNum% = 10 THEN PNum% = 0 BatchFile$ = SPACE$(1) + QPStrI$(PNum%) + ". " + BatchFile$ IF MNum = 11 THEN EXIT DO END IF MNum = MNum + 1 MenuItem$(MNum) = BatchFile$ ELSEIF QPLeft$(BatchFile$, 2) = "##" THEN BatchFile$ = QPTrim$(BatchFile$) MNum = MNum + 1 MenuItem$(MNum) = BatchFile$ END IF END IF END IF loopNum = loopNum + 1 LOOP 'CLOSE #1 CALL FClose(Handle%) default.menu: MenuType% = QPValI%(MenuType$) IF MenuType% = 0 THEN IF Mon = 1 THEN 'monochrome MenuType% = 200 MonType = 1 ELSEIF Mon = 2 THEN MenuType% = 200 MonType = 1 ELSE MenuType% = 100 END IF ELSEIF MenuType% = -1 THEN GOTO set.up END IF IF Mon = 1 THEN MenuType% = 200 MonType = 1 ELSEIF Mon = 2 THEN MenuType% = 200 MonType = 1 END IF ' +-------------------------------+---------------------------------+ ' | b% = box color | T% = title color | ' | BG% = background behind box | S% = "S E L E C T" color | ' | CM% = clearing color | MI% = menu item color | ' +-------------------------------+---------------------------------+ IF MenuType% = 1 THEN B% = 26: BG% = 34: CM% = 17: T% = 31: S% = 39: MI% = 31: BOTT% = 47 ELSEIF MenuType% = 2 THEN 'blue on white B% = 159: BG% = 31: CM% = 159: T% = 159: S% = 240: MI% = 159: BOTT% = 31 ELSEIF MenuType% = 3 THEN B% = 192: BG% = 159: CM% = 192: T% = 192: S% = 15: MI% = 192: BOTT% = 159 ELSEIF MenuType% = 4 THEN B% = 47: BG% = 160: CM% = 34: T% = 47: S% = 10: MI% = 47: BOTT% = 160 ELSEIF MenuType% = 5 THEN B% = 240: BG% = 17: CM% = 240: T% = 240: S% = 31: MI% = 240: BOTT% = 31 ELSEIF MenuType% = 6 THEN B% = 240: BG% = 34: CM% = 240: T% = 240: S% = 10: MI% = 240: BOTT% = 47 ELSEIF MenuType% = 7 THEN B% = 240: BG% = 51: CM% = 240: T% = 240: S% = 10: MI% = 240: BOTT% = 63 ELSEIF MenuType% = 8 THEN B% = 240: BG% = 0: CM% = 240: T% = 240: S% = 11: MI% = 240: BOTT% = 15 ELSEIF MenuType% = 9 THEN B% = 224: BG% = 160: CM% = 224: T% = 224: S% = 160: MI% = 224: BOTT% = 160 ELSEIF MenuType% = 10 THEN B% = 63: BG% = 0: CM% = 63: T% = 63: S% = 11: MI% = 63: BOTT% = 15 ELSEIF MenuType% = 11 THEN B% = 15: BG% = 0: CM% = 0: T% = 15: S% = 15: MI% = 15: BOTT% = 15 ELSEIF MenuType% = 12 THEN B% = 11: BG% = 51: CM% = 0: T% = 15: S% = 11: MI% = 15: BOTT% = 63 ELSEIF MenuType% = 13 THEN B% = 79: BG% = 17: CM% = 68: T% = 79: S% = 31: MI% = 75: BOTT% = 31 ELSEIF MenuType% = 14 THEN B% = 94: BG% = 51: CM% = 85: T% = 94: S% = 63: MI% = 95: BOTT% = 63 ELSEIF MenuType% = 15 THEN B% = 208: BG% = 159: CM% = 208: T% = 208: S% = 11: MI% = 208: BOTT% = 159 ELSEIF MenuType% = 100 THEN B% = 31: BG% = 157: CM% = 17: T% = 27: S% = 240: MI% = 31: BOTT% = 159 ELSEIF MenuType% = 200 THEN B% = 15: BG% = 0: CM% = 0: T% = 15: S% = 15: MI% = 15: BOTT% = 15 END IF set.up: IF MenuType% <> 100 THEN CALL ClearScr0(1, 1, 25, 80, BG%) ELSE CALL ClearScr0(1, 1, 25, 80, 157) END IF Col% = 31 IF NoShadow = 0 THEN CALL PaintBox0(3, 24, 5, 61, 0) CALL ClearScr0(2, 22, 4, 59, CM%) IF BottomLine$ <> "" THEN 'LOCATE 24, 40 - (LenBottom \ 2) + 1 LOCATE 24, 40 - (LenBottom \ 2) CALL MQPrint(" " + BottomLine$ + " ", BOTT%) END IF CALL Box0(2, 23, 4, 58, 2, B%) IF NoShadow = 0 THEN CALL PaintBox0(8, 20, 21, 65, 0) CALL ClearScr0(7, 18, 20, 63, CM%) CALL Box0(7, 19, 20, 62, 2, B%) LineA$ = CHR$(204) + STRING$(42, 205) + CHR$(185) LOCATE 9, 19: CALL MQPrint(LineA$, B%) LOCATE 8, Col%: CALL MQPrint(" ð S e l e c t ð ", S%) LOCATE 3, 40 - (LenTitle \ 2) + 1: CALL MQPrint(MenuTitle$, T%) FOR ShowItem = 1 TO 10 IF QPLeft$(MenuItem$(ShowItem), 1) <> "#" THEN M$ = MenuItem$(ShowItem) LOCATE 9 + ShowItem, Col%: CALL MQPrint(M$, MI%) END IF NEXT menu.continue: FOR ReadIn% = 1 TO 10 NextItem$ = SPACE$(41) CALL ReadScrn0(ReadIn% + 9, 20, NextItem$) NextItem$ = QPTrim$(NextItem$) IF QPLeft$(NextItem$, 1) = "1" THEN NextItem$ = SPACE$(1) + NextItem$ + SPACE$(1) Row% = ReadIn% + 9 MenuColr% = SCREEN(Row%, Col%, 1) IF MenuColr% >= 0 AND MenuColr% < 16 THEN ReverseColr% = 112 ELSEIF MenuColr% > 15 THEN ReverseColr% = 15 END IF LOCATE Row%, Col%, 0, 0, 0 CALL MQPrint(NextItem$, ReverseColr%) EXIT FOR END IF NEXT 'IF XFactor = 1 THEN ' 'ExitCode% = 27 ' 'CALL SetLevel(ExitCode%) ' 'LOCATE 24, 1, 1, 6, 7 ' 'CALL MQPrint(" ", BG%) ' END 'END IF loopdeloop: DO StartTime$ = SPACE$(11) LaterTime$ = SPACE$(11) CALL SysTime(StartTime$) Start& = Time2Num&(StartTime$) ' DO HitKey$ = INKEY$ CALL SysTime(LaterTime$) Later& = Time2Num&(LaterTime$) IF Later& = Start& + 300 THEN CurrentRow% = Row% GOSUB blank.it LOCATE CurrentRow%, 32, 0, 0, 0 CALL MQPrint(NextItem$, ReverseColr%) Row% = CurrentRow% GOTO loopdeloop END IF LOOP UNTIL LEN(HitKey$) > 0 TouchKey% = CVI(HitKey$ + CHR$(0)) IF TouchKey% > 1503 AND TouchKey% < 17409 THEN 'enables F1 - F10 IdentKey$ = STR$(((TouchKey% - 15104) \ 256) + 1) IdentKey$ = QPTrim$(IdentKey$) IF IdentKey$ = "10" THEN IdentKey$ = "0" END IF IF INSTR(EnableF$, IdentKey$) THEN IF IdentKey$ = "0" THEN ExitCode% = 68 ELSE ExitCode% = VAL(IdentKey$) + 58 END IF CALL SetLevel(ExitCode%) LOCATE 24, 1, 1, 6, 7 CALL MQPrint(" ", BG%) END END IF 'Keys h, H, ? ELSEIF TouchKey% = 104 OR TouchKey% = 72 OR TouchKey% = 63 THEN GOSUB press.h ELSEIF TouchKey% = 13 THEN ' XCode$ = SPACE$(1) CALL ReadScrn0(Row%, Col% + 1, XCode$) ExitCode% = QPValI%(XCode$) ExitCode% = ExitCode% + 48 CALL SetLevel(ExitCode%) 'LOCATE 24, 1, 1, 6, 7 'CALL MQPrint(" ", BG%) END ELSEIF TouchKey% = 20480 THEN ' LOCATE Row%, Col%, 0, 0, 0 CALL MQPrint(NextItem$, MenuColr%) GOSUB read.row.down LOCATE Row%, Col%: CALL MQPrint(NextItem$, ReverseColr%) ELSEIF TouchKey% = 18432 THEN ' LOCATE Row%, Col%, 0, 0, 0 CALL MQPrint(NextItem$, MenuColr%) GOSUB read.row.up LOCATE Row%, Col%: CALL MQPrint(NextItem$, ReverseColr%) ELSEIF TouchKey% = 27 THEN ' CALL SetLevel(27) 'LOCATE 24, 1, 1, 6, 7 'CALL MQPrint(" ", BG%) END ELSEIF TouchKey% = 3 THEN ' CALL SetLevel(27) 'LOCATE , , 1, 6, 7 'CALL MQPrint(" ", BG%) END ELSEIF TouchKey% = 98 OR TouchKey% = 66 THEN 'press b or B CurrentRow% = Row% GOSUB blank.it LOCATE CurrentRow%, Col%, 0, 0, 0 CALL MQPrint(NextItem$, ReverseColr%) Row% = CurrentRow% ELSEIF TouchKey% > 47 AND TouchKey% < 58 THEN 'press a number CountNum = 0 LOCATE Row%, Col%: CALL MQPrint(NextItem$, MenuColr%) GOSUB read.numbers IF CountNum = 2 THEN LOCATE 10, Col%: CALL MQPrint(MenuItem$(1), ReverseColr%) NextItem$ = MenuItem$(1): Row% = 10 ELSE LOCATE Row%, Col%: CALL MQPrint(NextItem$, ReverseColr%) END IF XCode$ = SPACE$(1) CALL ReadScrn0(Row%, Col% + 1, XCode$) ExitCode% = QPValI%(XCode$) ExitCode% = ExitCode% + 48 IF CountNum <> 2 THEN 'don't end if extended number pressed CALL SetLevel(ExitCode%) 'LOCATE 24, 1, 1, 6, 7 'CALL MQPrint(" ", BG%) END END IF END IF LOOP read.numbers: NextItem$ = SPACE$(41) CALL ReadScrn0(Row%, 20, NextItem$) NextItem$ = QPTrim$(NextItem$) IF QPLeft$(NextItem$, 1) = CHR$(TouchKey%) THEN NextItem$ = SPACE$(1) + NextItem$ + SPACE$(1) RETURN ELSEIF QPLeft$(NextItem$, 1) <> CHR$(TouchKey%) THEN Row% = Row% + 1 IF Row% > 19 THEN CountNum = CountNum + 1 IF CountNum = 2 THEN CALL Chime(1) Row% = 10 RETURN END IF Row% = 10 END IF GOTO read.numbers END IF read.row.down: Row% = Row% + 1 IF Row% > 19 THEN Row% = 10 END IF NextItem$ = SPACE$(41) CALL ReadScrn0(Row%, 20, NextItem$) NextItem$ = QPTrim$(NextItem$) IF NextItem$ = "" THEN IF Row% > 19 THEN RETURN END IF GOTO read.row.down END IF NextItem$ = SPACE$(1) + NextItem$ + SPACE$(1) RETURN read.row.up: Row% = Row% - 1 IF Row% < 10 THEN Row% = 19 END IF NextItem$ = SPACE$(41) CALL ReadScrn0(Row%, 20, NextItem$) NextItem$ = LTRIM$(RTRIM$(NextItem$)) IF NextItem$ = "" THEN IF Row% < 10 THEN RETURN END IF GOTO read.row.up END IF NextItem$ = SPACE$(1) + NextItem$ + SPACE$(1) RETURN no.batch.file: COLOR 15, 0: CLS LOCATE 3, 38: CALL MQPrint("OOPS!", 12) LOCATE 5, 14: CALL MQPrint("Error in starting BeeMenu. In your batch file", 15) LOCATE 6, 14: CALL MQPrint("please include the name of the batch file after the", 15) LOCATE 7, 14: CALL MQPrint("word BEEMENU. Example -> BEEMENU /b practice.bat", 15) LOCATE 8, 14: CALL MQPrint("The /b switch indicates that the indicated file is a ", 15) LOCATE 9, 14: CALL MQPrint("batch file. Please refer to BeeMenu.Doc.", 15) LOCATE 11, 15, 0, 0, 0: CALL MQPrint("Press to view BEEMENU.DOC or to exit.", 15) LOCATE 11, 22, 0, 0, 0: CALL MQPrint("ENTER", 11) LOCATE 11, 53, 0, 0, 0: CALL MQPrint("ESC", 11) GOSUB press.esc IF PoundKey% = 13 THEN ShowBMdoc% = LoadExec%("ShowOff.Exe", "BeeMenu.Doc") END IF CALL SetLevel(100) COLOR 7, 0: CLS : LOCATE 1, 1, 1, 6, 7: END make.box.1: CALL PaintBox0(8, 13, 19, 70, 8) CALL ClearScr0(7, 12, 18, 68, 240) CALL Box0(7, 13, 18, 67, 2, 240) Line$ = CHR$(199) + STRING$(53, 196) + CHR$(182) LOCATE 9, 13: CALL MQPrint(Line$, 240) LOCATE 16, 13: CALL MQPrint(Line$, 240) RETURN no.such.file: COLOR 15, 0: CLS LOCATE 3, 38: CALL MQPrint("OOPS!", 12) LOCATE 5, 19: CALL MQPrint("Error in starting BeeMenu. Unable to locate", 15) LOCATE 6, 19: CALL MQPrint("the indicated batch file : " + UCASE$(BatchFile$), 15) LOCATE 6, 46: CALL MQPrint(UCASE$(BatchFile$), 11) LOCATE 8, 29, 0, 0, 0: CALL MQPrint("PRESS TO CONTINUE", 15) LOCATE 8, 36, 0, 0, 0: CALL MQPrint("ESC", 11) LOCATE , , 0, 0, 0 DO DO NoSuch$ = INKEY$ LOOP UNTIL LEN(NoSuch$) > 0 NoSuch% = CVI(NoSuch$ + CHR$(0)) IF NoSuch% = 27 THEN CALL SetLevel(100) END END IF LOOP press.h: GOSUB save.screen GOSUB make.box.1 LOCATE 8, 30: CALL MQPrint("<<< BeeMenu v2.0 >>>", 240) LOCATE 10, 17: CALL MQPrint("The BeeMenu Program is designed to interact ", 240) LOCATE 11, 17: CALL MQPrint("with regular batch files. Read BeeMenu.Doc ", 240) LOCATE 12, 17: CALL MQPrint("for complete information. BeeMenu Version 2.0", 240) LOCATE 13, 17: CALL MQPrint("was written on 03/01/2006 and is declared Public", 240) LOCATE 14, 17: CALL MQPrint("Public Domain and FreeWare. Author - Don Smith.", 240) LOCATE 15, 17: CALL MQPrint("Don's Email: smithdonb@earthlink.net", 240) LOCATE 17, 15, 0, 0, 0: CALL MQPrint("Press To Return or To View BEEMENU.DOC", 240) DO DO F1Key$ = INKEY$ LOOP UNTIL LEN(F1Key$) > 0 PressF1 = CVI(F1Key$ + CHR$(0)) IF PressF1 = 27 THEN GOSUB restore.screen RETURN ELSEIF PressF1 = 13 THEN 'There = Exist%("ShowOff.Exe") 'ThereIs = Exist%("BeeMenu.Doc") There = FCount%("ShowOff.Exe") 'added ThereIs = FCount%("BeeMenu.Doc") 'added IF There = 0 THEN CALL Box0(12, 10, 14, 71, 2, 12) LOCATE 13, 11 CALL MQPrint(" Unable To Locate SHOWOFF.EXE (File Browser). PRESS .", 12) CALL Chime(6) GOSUB press.esc GOSUB restore.screen RETURN ELSEIF ThereIs = 0 THEN CALL Box0(12, 18, 14, 63, 2, 12) LOCATE 13, 19 CALL MQPrint(" Unable To Locate BEEMENU.DOC. PRESS .", 12) CALL Chime(6) GOSUB press.esc GOSUB restore.screen RETURN ELSE IF MonType = 1 THEN 'SHELL "Showoff beemenu.doc /m" ShowDoc% = LoadExec%("ShowOff.Exe", "BeeMenu.Doc /m") GOSUB restore.screen RETURN ELSEIF MonType = 0 THEN 'SHELL "ShowOff.Exe BeeMenu.Doc" ShowDoc% = LoadExec%("ShowOff.Exe", "BeeMenu.Doc") GOSUB restore.screen RETURN END IF END IF END IF LOOP press.esc: DO DO PressKey$ = INKEY$ LOOP UNTIL LEN(PressKey$) > 0 PoundKey% = CVI(PressKey$ + CHR$(0)) IF PoundKey% = 27 THEN RETURN ELSEIF PoundKey% = 13 THEN RETURN END IF LOOP first.para: First.1$ = QPRight$(ComLine$, QPLen%(ComLine$) - 1) First.1$ = QPLeft$(First.1$, (QPValI%(Para$(2)) - 2)) First.1$ = QPTrim$(First.1$) RETURN second.para: GOSUB first.para Second.2$ = QPMid$(ComLine$, (QPValI%(Para$(2)) + 1), (QPValI%(Para$(3)) - (QPValI%(Para$(2)))) - 1) Second.2$ = QPTrim$(Second.2$) RETURN third.para: GOSUB first.para GOSUB second.para Third.3$ = QPRight$(ComLine$, QPLen%(ComLine$) - (QPValI%(Para$(3)))) Third.3$ = QPTrim$(Third.3$) RETURN save.screen: REDIM Array%(3000) CALL ScrnSave0(1, 1, 25, 80, SEG Array%(1)) RETURN restore.screen: CALL ScrnRest0(1, 1, 25, 80, SEG Array%(1)) RETURN blank.it: GOSUB save.screen Message1$ = "SCREEN BLANKED TO PROTECT MONITOR. PRESS TO EXIT. " Message2$ = "<<<< BeeMenu >>>>" Row% = 3: BCol% = 12 Halt = 0 COLOR 0, 0, 0: CLS DO LOCATE Row%, BCol% + 1, 0, 0, 0 CALL Box0(Row% - 2, BCol% - 2, Row% + 1, BCol% + 59, 2, 7) CALL MQPrint(Message1$, 7) LOCATE Row% - 1, 32: CALL MQPrint(Message2$, 14) DO WHILE Halt < 270 EscKey$ = INKEY$ CALL Pause(1) IF EscKey$ = CHR$(27) THEN GOSUB restore.screen RETURN END IF Halt = Halt + 1 LOOP CALL ClearScr0(1, 1, 25, 80, 0) Row% = Row% + 3 IF Row% > 23 THEN Row% = 3 END IF Halt = 0 LOOP FUNCTION KeyCode% DO KC$ = INKEY$ LOOP UNTIL LEN(KC$) > 0 KeyCode% = CVI(KC$ + CHR$(0)) END FUNCTION