Comment ======================================= Lite Menu Lite Menu requires a data file, in which it stores information about the choices. It has password capabilites to keep the user Out of the modify and exit to dos choices. * Warning * Messing with the *.dat file will mess up your program !!!! Copyright 1990-93 by Marc Perkel * All rights Reserved (417) 866-1222 Programmed by Kevin Moore and Marc Perkel ======================================= EndComment Var MenuInverseForeColor MenuInverseBackColor MainScreenForeColor Menu NewProgram Subs TotalSubs LongestSubLine MenuHeader MenuTitle ModifyPassWord ExitToDosPassWord ChoicePtr %ThisDirectory LongestItem FileSaved MenuForeColor MenuBackColor MenuBorderForeColor MenuBorderBackColor MenuHeaderForeColor MenuHeaderBackColor ExplodeStatus ShadowStatus SoundStatus Index I In TmpSt BorderStyle BottomOfScreenText MainScreenBackColor TmpWd Height Width ScreenArr ClockForeColor ClockBackColor Var TitleRow MsgRow BatEditor Count DosUtilPassword %ThisDrive ConfigPassword MenuName UtilForeColor UtilBackColor UtilBorderForeColor UtilBorderBackColor UtilInverseForeColor UtilInverseBackColor UtilHeaderForeColor UtilHeaderBackColor TitleForeColor TitleBackColor TitleBorderForeColor TitleBorderBackColor TitleInverseForeColor TitleInverseBackColor TitleHeaderForeColor TitleHeaderBackColor BackDropCharacter TitleExplodeStatus TitleShadowStatus TitleSoundStatus UtilExplodeStatus UtilShadowStatus UtilSoundStatus UtilBorderStyle TitleBorderStyle ConBlankTime ConLockword ConBlankMessage VerNo MMActive sdf SubListName DirScanProg PickProg Const None = 1 Single = 2 Double = 3 Block = 4 Larr = 19 Rarr = 4 Uarr = 5 Darr = 24 Version = 'Version 1.8' ProgramName = 'Lite Menu' CopyRightMsg = 'Copyright 1990-91 by Marc Perkel * All Rights Reserved.' MMenu = 1 Util = 2 Title = 3 Qualifier InUse Description Path Name PassWord Parameters Pause Initialize %ThisDrive = left(path,2) LoadData ShadowColor (grey, black) DrawTop DrawBottom ('F1 - Help * F2 - Save * F3 - DOS Utilities * F10 - Setup') While ChoicePtr = 0 NoChoices EndWhile Draw Main ;------ Show Item for Debugging Procedure ShowItem (Item) DrawBox 1 23 79 3 Write ' >' Item '<' Wait 250 EraseTopWindow EndProc ;ShowItem ;------ Uses same name as Pick Directory Procedure GetSubListName var SearchSt W if SubListName > '' then Return (SubListName) if ExistDir 'C:\' SubListName = 'C:\PD.PIC' else SubListName = CleanFileName('PD.PIC') endif SearchSt = ReadEnv('PD.EXE') if SearchSt > '' W = pos('/$',SearchSt) if W > 0 SearchSt = Mid(SearchSt,W + 2,255) SubListName = NextWord(SearchSt) if Left(SearchSt,1) = '.' delete(SearchSt,1,1) SubListName = SubListName + '.' + NextWord(SearchSt) endif endif endif Return (SubListName) EndProc ;------ This finds the program to use for the subdirectory pick file. Procedure SetScanPrograms if DirScanProg > '' then Return DirScanProg = ExistOnPath('PIPEDIR.EXE') if DirScanProg = '' DirScanProg = ExistOnPath('WHEREIS.EXE'); if DirScanProg = '' Abort('You will need WHEREIS.EXE or PIPEDIR.EXE from the DOS TOOLBOX to run this program!') endif endif DirScanProg = DirScanProg + '/T' if pos('PIPEDIR',DirScanProg) > 0 then DirScanProg = DirScanProg + '/W' DirScanProg = DirScanProg + '>' + GetSubListName if not ExistFile(SubListName) then ScanDirectories PickProg = ExistOnPath('PD.EXE') if PickProg > '' then PickProg = PickProg + '/E' EndProc ;SetScanPrograms Procedure ScanDirectories MessageBox('','Scanning Directories', 0, 0) if DirScanProg = '' then SetScanPrograms ClearScreenFirst Off Execute (DirScanProg) EraseTopWindow TotalSubs = 0 EndProc ; ScanDirectories ;--- Procedure ReadDirectories if TotalSubs > 0 then return Dispose Subs ReadTextFile(GetSubListName,Subs) TotalSubs = NumberOfElements(Subs) LongestSubLine = LongestLine EndProc ;ReadDirectories ;--- Procedure ChooseDirectory var BoxDim SubChoice OldPath if DirScanProg = '' then SetScanPrograms if PickProg > '' OldPath = Path ClearScreenFirst Off PauseAfterExecute Off Execute PickProg ClearScreenFirst SubChoice = Path ChDir(OldPath) Return SubChoice endif ReadDirectories if TotalSubs > 1 BoxDim[3] = Min(LongestSubLine + 6,ScreenWidth - 6) BoxDim[4] = Min(TotalSubs + 2,ScreenHeight - 6) BoxDim[1] = Max(Min(45,ScreenWidth - BoxDim[3]),1) BoxDim[2] = Max(Min(7,ScreenHeight - BoxDim[4]),4) MakeBox( '', BoxDim[1], BoxDim[2], BoxDim[3], BoxDim[4]) SubChoice = PickOne Subs EraseTopWindow endif if TotalSubs = 1 then SubChoice = Subs[1] Return SubChoice EndProc ;ChooseDirectory Procedure AdvancedOptions Var Select MakeBox('Advanced Options', 0, 10, 29, 8, Util) Writeln(" A - PassWord") Writeln(" B - Parameters") Writeln(" C - Pause after execute") Writeln(" D - Path") Writeln(" E - Program") Write (" F - Create/Edit Bat File") UseArrows On Repeat Select = GetKey if Select = 'A' FileSaved = False Menu[Index].PassWord = ReadTextLine('PassWord', Menu[Index].PassWord, 35, 16) endif if Select = 'B' FileSaved = False Menu[Index].Parameters = ReadTextLine('Program Parameters', Menu[Index].Parameters, 60, 16) endif if Select = 'C' FileSaved = False if AskYesNo('Pause after execute?', 16) Menu[Index].Pause = True else Menu[Index].Pause = False endif endif if Select = 'D' then Menu[Index].Path = ReadTextLine('Edit Path', Menu[Index].Path, 50, 16) if Select = 'E' then Menu[Index].Name = ReadTextLine('Edit Program', Menu[Index].Name, 50, 16) if Select = 'F' then EditBat Until Select = ESC EraseTopWindow EndProc ;AdvancedOptions ;--- Procedure Colors (WinNum) Var Select MakeBox('Colors', 0, 0, 17, 6, Util) Writeln(" A - Inside ") Writeln(" B - Border ") Writeln(" C - Header ") Write (" D - Inverse ") Repeat Select = GetKey if Select = 'A' if WinNum = MMenu then ChooseColors (MenuForeColor , MenuBackColor, 1) if WinNum = Util then ChooseColors (UtilForeColor, UtilBackColor, 9) if WinNum = Title then ChooseColors (TitleForeColor, TitleBackColor, 13) endif if Select = 'B' if WinNum = MMenu then ChooseColors (MenuBorderForeColor, MenuBorderBackColor, 2) if WinNum = Util then ChooseColors (UtilBorderForeColor, UtilBorderBackColor, 10) if WinNum = Title then ChooseColors (TitleBorderForeColor, TitleBorderBackColor, 14) endif if Select = 'C' if WinNum = MMenu then ChooseColors (MenuHeaderForeColor, MenuHeaderBackColor, 4) if WinNum = Util then ChooseColors (UtilHeaderForeColor, UtilHeaderBackColor, 12) if WinNum = Title then ChooseColors (TitleHeaderForeColor, TitleHeaderBackColor, 16) endif if Select = 'D' if WinNum = MMenu then ChooseColors (MenuInverseForeColor, MenuInverseBackColor, 3) if WinNum = Util then ChooseColors (UtilInverseForeColor, UtilInverseBackColor, 11) if WinNum = Title then ChooseColors (TitleInverseForeColor, TitleInverseBackColor, 15) endif Until Select = ESC EraseTopWindow EndProc ;ColorsMenu ;--- Procedure Backup Var Select BackUpPath MakeBox('Backup Hard Disk', 26, 17, 30, 4, Util) Writeln(' A - Entire Disk') Write (' B - One Directory') Repeat Select = GetKey if Select = 'A' ChDir('\') Bat('BACKUP C: A: /S') ExitMenu endif if Select = 'B' BackupPath = ChooseDirectory Chdir(BackUpPath) Bat('BACKUP C: A:') ExitMenu endif if Select = F1 then Help Until Select = ESC EraseTopWindow EndProc ;BackUp ;--- Procedure KbdSpeed Var Select Speed Speed = '' MakeBox('Keyboard Repeat Speed', 20, 11, 29, 5, Util) Writeln(' A - Slow Keyboard Speed') Writeln(' B - Norm Keyboard Speed') Write (' C - Fast Keyboard Speed') Repeat Select = GetKey if Select = 'A' then Speed = '25' if Select = 'B' then Speed = '10' if Select = 'C' then Speed = '4' if Select = F1 then Help Until (Select = ESC) or (Speed > '') EraseTopWindow Return Speed EndProc ;--- Procedure DosUtilities Var Select Parm ClearScreenFirst On ClearScreenOnExit On MakeBox('Dos Utilities', 4, 0, 26, 13, Util) Writeln(' A - Directory Master') Writeln(' B - Pick Directory') Writeln(' C - Directory') Writeln(' D - Free') Writeln(' E - Whereis') Writeln(' F - Memory Map') Writeln(' G - Keyboard Speed') Writeln(' H - DOS Shell') Writeln(' I - Format Floppies') Writeln(' J - Backup Hard Disk') Write (' K - DOS command') Repeat Select = GetKey if Select = 'A' if ExistOnPath('DMLITE.EXE') > '' Bat 'DMLITE.EXE' ExitMenu else Error('Could not find Directory Master!') endif endif if Select = 'B' if ExistOnPath('PD.EXE') > '' Bat 'PD.EXE' ExitMenu else Error('Could not find Pick Directory!') endif endif if Select = 'C' Parm = ReadTextLine('Directory Mask', path + '\*.*', 60, 10) if Parm = '' then Parm = path + '\*.*' if LastKey = Char(13) if ExistOnPath('D.EXE') > '' Bat 'D ' + Parm + ' /W' else Bat 'DIR/P ' + Parm Bat 'Pause' endif ExitMenu endif endif if Select = 'D' Parm = ReadTextLine('Drive', left(path,2), 60, 10) if LastKey = char(13) if ExistonPath('FREE.EXE') > '' Bat 'FREE.EXE ' + Parm else Bat 'Chkdsk ' + Parm endif Bat 'Pause' ExitMenu endif endif if Select = 'E' if ExistOnPath ('WHEREIS.EXE') > '' Parm = ReadTextLine(' Mask (*.doc) ', '', 60, 10) if Lastkey = Char(13) Bat 'WHEREIS.EXE ' + Parm Bat 'Pause' ExitMenu endif else Error('Could not find Whereis!') endif endif if Select = 'F' if ExistOnPath('RAMMAP.EXE') > '' Bat 'RAMMAP.EXE' Bat 'Pause' ExitMenu else Error('Could not find RamMap!') endif endif if Select = 'G' if ExistOnPath('KBD.EXE') > '' Parm = KbdSpeed if Parm > '' Bat 'KBD.EXE ' + Parm ExitMenu endif else Error('Could not find RamMap!') endif endif if Select = 'H' if ExistOnPath('DOLIST.EXE') > '' Bat 'DOLIST.EXE' else Bat 'Echo Type EXIT to Return to Menu' Bat '.' Bat ReadEnv('COMSPEC') endif ExitMenu endif if Select = 'I' then Format if Select = 'J' then BackUp if Select = 'K' Parm = ReadTextLine('DOS Command', '', 60, 10) if LastKey = Char(13) Bat Parm Bat 'Pause' ExitMenu endif endif Until Select = ESC EraseTopWindow EndProc ;DosUtilities ;--- Procedure Edit Var x y spc = ' ' Select FileSaved = False if ExplodeStatus then Explode Off DrawBottom ('ESC - Main Menu * F4 - Menu Configuration') if ExplodeStatus then Explode On RedrawSelections Repeat Select = GetKey if (Select >= 'A') and (Select <= 'Z') ChoicePtr = ChoicePtr + 1 ModifyMenuChoice (Select) if Select < 'N' GotoXY(6, (Ord(Select) - 64)) Write(spc) GotoXY(6, (Ord(Select) - 64)) else GotoXY(42, (Ord(Select) - 77)) Write(spc) GotoXY(42, (Ord(Select) - 77)) endif Write(Mid(Menu[(Ord(Select) - 64)].Description,4,255)) endif if Select = F4 if EnterPassWord(ConfigPassword, 19) EditUtilities endif endif Until Select = ESC UpDate EraseTopWindow EraseTopWindow UseArrows On EndProc ;Edit ;--- Procedure Format Var Select MakeBox( 'Format Floppy Disk Menu', 0, 10, 44, 6, Util) Writeln ' 1 - Format 360 5 - Format /S 360' Writeln ' 2 - Format 1.2M 6 - Format /S 1.2M' Writeln ' 3 - Format 720 7 - Format /S 720' Write ' 4 - Format 1.4M 8 - Format /S 1.4M' Repeat Select = GetKey if Select = '1' then Format2('/4') if Select = '2' then Format2('') if Select = '3' then Format2('/N:9/T:80') if Select = '4' then Format2('/N:18/T:80') if Select = '5' then Format2('/4/S') if Select = '6' then Format2('/S') if Select = '7' then Format2('/N:9/T:80/S') if Select = '8' then Format2('/N:18/T:80/S') if Select = F1 then Help Until Select = ESC EraseTopWindow EndProc ;Format Procedure Format2 (Parm) Var Select if DosVersionString >= '5.00' then Parm = Parm + '/U' MakeBox( 'Drive', 49, 14, 11, 4, Util) Writeln ' A:' Write ' B:' Select = GetKey while Select <> ESC if Select = 'A' Bat('FORMAT A: ' + Parm) ExitMenu endif if Select = 'B' Bat('Format B: ' + Parm) ExitMenu endif Select = GetKey EndWhile EraseTopWindow EndProc ; Format ;--- Procedure Main Var Select MMActive = True %ThisDirectory = Path UseCommand On NoExit SavePosition On UseArrows Repeat Select = GetKey if (Select >= 'A') and (Select <= 'Z') Index = (Ord(Select) - 64) if Menu[Index].Inuse Trim(Menu[Index].Name) if Menu[Index].Name > '' BuildBat (Index) else Error('You have not selected a program for this menu choice!!') endif endif endif if Select = F10 EraseTopWindow MMActive = False Edit UpdateScreen MMActive = True endif if Select = F3 if EnterPassWord (DosUtilPassword, 19) MMActive = False DosUtilities MMActive = True EraseTopWindow Draw endif endif if Select = F4 if EnterPassWord (ConfigPassword, 19) MMActive = False EditUtilities UpDateScreen MMActive = True endif endif if Select = (Char(0) + Char(31)) ;SetUp Setup endif if Select = ESC then Leave Until Select = alt0 EndProc ;MainMenu ;--- Procedure MenuBorderStyle (WinNum) Var Select FileSaved = False MakeBox( 'Menu Border Style', 0, 0, 30, 5, Util) Writeln(" A - Single Line Border " + Char(196)) Writeln(" B - Double Line Border " + Char(205)) Write (" C - Block Box Border " + Char(219)) Select = GetKey While Select <> ESC if Select = 'A' if WinNum = MMenu then BorderStyle = Single if WinNum = Util then UtilBorderStyle = Single if WinNum = Title then TitleBorderStyle = Single EraseTopWindow Return endif if Select = 'B' if WinNum = MMenu then BorderStyle = Double if WinNum = Util then UtilBorderStyle = Double if WinNum = Title then TitleBorderStyle = Double EraseTopWindow Return endif if Select = 'C' if WinNum = MMenu then BorderStyle = Block if WinNum = Util then UtilBorderStyle = Block if WinNum = Title then TitleBorderStyle = Block EraseTopWindow Return endif if Select = F1 then Help Select = GetKey EndWhile EraseTopWindow EndProc ;MenuBorderStyle ;--- Procedure BackDrop Var Select FileSaved = False MakeBox( '', 37, 10, 15, 7, Util) Writeln(" A - " + Char(176)) Writeln(" B - " + Char(177)) Writeln(" C - " + Char(178)) Writeln(" D - " + Char(185)) Write (" E - Blank") Select = GetKey While Select <> ESC if Select = 'A' BackDropCharacter = 176 EraseTopWindow Return endif if Select = 'B' BackDropCharacter = 177 EraseTopWindow Return endif if Select = 'C' BackDropCharacter = 178 EraseTopWindow Return endif if Select = 'D' BackDropCharacter = 185 EraseTopWindow Return endif if Select = 'E' BackDropCharacter = 32 EraseTopWindow endif if Select = F1 then Help Select = GetKey EndWhile EraseTopWindow EndProc ;MenuBorderStyle ;--- Procedure WhichWindow Var Select, RC = 0 MakeBox( '', 4, 14, 27, 6, Util) Writeln( " A - Main Menu Window" ) Writeln( " B - Title Window" ) Writeln( " C - Utility Window" ) Write ( " D - Global Settings" ) Repeat Select = GetKey if Select = 'A' Then RC = MMenu if Select = 'B' Then RC = Title if Select = 'C' Then RC = Util if Select = 'D' Then RC = 99 Until ((Select = Esc) or (Rc > 0)) EraseTopWindow Return RC EndProc ;WhichWin ;--- Procedure Global Var Select MakeBox( 'Global', 46, 7, 30, 7, Util) Writeln(" A - Menu Title") Writeln(" B - Menu Header") Writeln(" C - Bottom of screen text") Writeln(" D - BackDrop Character") Write (" E - BackDrop Color") Repeat Select = GetKey FileSaved = False if Select = 'A' MenuTitle = ReadTextLine('Menu Title', MenuTitle, 60, 11) if Not (MenuTitle > '') then MenuTitle = 'Your Name Here' Trim(MenuTitle) endif if Select = 'B' then MenuHeader = ReadTextLine('Menu Header', MenuHeader, 30, 11) if Select = 'C' BottomOfScreenText = ReadTextLine('Bottom of screen text', BottomOfScreenText, 60, 11) if BottomOfScreenText = '' then BottomOfScreenText = CopyrightMsg endif if Select = 'D' then BackDrop if Select = 'E' then ChooseColors (MainScreenForeColor, MainScreenBackColor, 5) Until Select = Esc EraseTopWindow EndProc ;Global ;--- Procedure Setup Var Select CurrWin TmpBool CurrWin = WhichWindow if CurrWin = 99 Global Return endif MakeBox( 'Setup', 49, 7, 29, 7, Util) Writeln(" A - Colors") Writeln(" B - Menu Border Style") Writeln(" C - Exploding Windows") Writeln(" D - Shadows") Write (" E - Sound") Repeat Select = GetKey FileSaved = False if Select = 'A' then Colors (CurrWin) if Select = 'B' then MenuBorderStyle (CurrWin) if Select = 'C' TmpBool = AskYesNo('Use exploding windows ?', 0) if CurrWin = MMenu then ExplodeStatus = TmpBool if CurrWin = Util then UtilExplodeStatus = TmpBool if CurrWin = Title then TitleExplodeStatus = TmpBool endif if Select = 'D' TmpBool = AskYesNo('Use window shadowing ?', 0) if CurrWin = MMenu then ShadowStatus = TmpBool if CurrWin = Util then UtilShadowStatus = TmpBool if CurrWin = Title then TitleShadowStatus = TmpBool endif if Select = 'E' TmpBool = AskYesNo('Use sound effects ?', 0) if CurrWin = MMenu then SoundStatus = TmpBool if CurrWin = Util then UtilSoundStatus = TmpBool if CurrWin = Title then TitleSoundStatus = Tmpbool endif Until Select = Esc EraseTopWindow EndProc ;Setup ;--- Procedure EditUtilities Var Select MakeBox( 'Menu Setup', 4, 7, 31, 5, Util) Writeln(" A - Main Screen Setup") Writeln(" B - ReScan Subdirectories") Write (" C - Edit Passwords") UseArrows On Select = GetKey While Select <> ESC if Select = 'A' then Setup if Select = 'B' then ScanDirectories if Select = 'C' then EditPasswords if Select = F1 then Help Select = GetKey EndWhile EraseTopWindow EndProc ;EditUtilities ;--- Procedure EditPasswords Var Select MakeBox( 'Password Setup', 4, 13, 36, 7, Util) Writeln(" A - Password to Edit Menu") Writeln(" B - Password to Exit to DOS") Writeln(" C - Password for DOS Utilities") Writeln(" D - Password for Configuration") Write (" E - View Current Setup") UseArrows On Select = GetKey While Select <> ESC if Select = 'A' FileSaved = False ModifyPassWord = ReadTextLine('Password to Edit Menu', ModifyPassWord, 29, 10) endif if Select = 'B' FileSaved = False ExitToDosPassWord = ReadTextLine('Password to Exit to DOS',ExitToDosPassWord, 31, 10) endif if Select = 'C' FileSaved = False DosUtilPassword = ReadTextLine('Password for Dos Utilities', DosUtilPassword, 32, 10) endif if Select = 'D' FileSaved = False ConfigPassword = ReadTextLine('Password for Configuration', ConfigPassword, 30, 10) endif if Select = 'E' then ViewCurrentStatus if Select = F1 then Help Select = GetKey EndWhile EraseTopWindow EndProc ;EditUtilities ;--- { END MENUS } { File I/O } { Save and Load Menu Data } Procedure LoadData if MenuName = '' MenuName = ReadEnv('MENU') if MenuName = '' then MenuName = ExistOnPath('LITE.DAT') if MenuName = '' then MenuName = CleanFileName('LITE.DAT') endif if not ExistFile(MenuName) InitilizeData Return endif FileAssign(In, MenuName) FileOpen(In) VerNo = FileReadln(In) LongestItem = Value(FileReadln(In)) Width = Value(FileReadln(In)) Height = Value(FileReadln(In)) MenuTitle = FileReadln(In) ModifyPassWord = FileReadln(In) ExitToDosPassWord = FileReadln(In) ChoicePtr = Value(FileReadln(In)) MenuHeader = FileReadln(In) BottomOfScreenText = FileReadln(In) BorderStyle = Value(FileReadln(In)) UtilBorderStyle = Value(FileReadln(In)) TitleBorderStyle = Value(FileReadln(In)) MenuForeColor = Value(FileReadln(In)) MenuBackColor = Value(FileReadln(In)) MenuBorderForeColor = Value(FileReadln(In)) MenuBorderBackColor = Value(FileReadln(In)) MenuInverseForeColor = Value(FileReadln(In)) MenuInverseBackColor = Value(FileReadln(In)) MenuHeaderForeColor = Value(FileReadln(In)) MenuHeaderBackColor = Value(FileReadln(In)) MainScreenForeColor = Value(FileReadln(In)) MainScreenBackColor = Value(FileReadln(In)) UtilForeColor = Value(FileReadln(In)) UtilBackColor = Value(FileReadln(In)) UtilHeaderForeColor = Value(FileReadln(In)) UtilHeaderBackColor = Value(FileReadln(In)) UtilBorderForeColor = Value(FileReadln(In)) UtilBorderBackColor = Value(FileReadln(In)) UtilInverseForeColor = Value(FileReadln(In)) UtilInverseBackColor = Value(FileReadln(In)) TitleForeColor = Value(FileReadln(In)) TitleBackColor = Value(FileReadln(In)) TitleHeaderForeColor = Value(FileReadln(In)) TitleHeaderBackColor = Value(FileReadln(In)) TitleBorderForeColor = Value(FileReadln(In)) TitleBorderBackColor = Value(FileReadln(In)) TitleInverseForeColor = Value(FileReadln(In)) TitleInverseBackColor = Value(FileReadln(In)) TitleRow = Value(FileReadln(In)) MsgRow = Value(FileReadln(In)) ExplodeStatus = FileReadln(In) = "TRUE" ShadowStatus = FileReadln(In) = "TRUE" SoundStatus = FileReadln(In) = "TRUE" UtilExplodeStatus = FileReadln(In) = "TRUE" UtilShadowStatus = FileReadln(In) = "TRUE" UtilSoundStatus = FileReadln(In) = "TRUE" TitleExplodeStatus = FileReadln(In) = "TRUE" TitleShadowStatus = FileReadln(In) = "TRUE" TitleSoundStatus = FileReadln(In) = "TRUE" i = 1 While i <= ChoicePtr TmpSt = FileReadln(In) Index = Ord(Left(TmpSt,1)) - 64 ScreenArr[i] = TmpSt Menu[Index].Description = TmpSt Menu[Index].InUse = TRUE Menu[Index].Path = FileReadln(In) Menu[Index].name = FileReadln(In) Menu[Index].PassWord = FileReadln(In) Menu[Index].Parameters = FileReadln(In) Menu[Index].Pause = FileReadln(In) = "TRUE" i = i + 1 EndWhile BatEditor = FileReadln(In) DosUtilPassword = FileReadln(In) ConfigPassword = FileReadLn(In) BackDropCharacter = Value(FileReadLn(In)) FileClose(In) EndProc ;LoadData ;--- Procedure SaveChanges Var tmparr, i, x, Out FileSaved = TRUE UseArrows Off MessageBox('','Saving...',60,6) ReadTextFile(MenuName, tmparr) UpDate FileAssign(Out, MenuName) FileCreate(Out) FileWriteln(Out, VerNo) FileWriteln(Out, Str(LongestItem)) FileWriteln(Out, Str(Width)) FileWriteln(Out, Str(Height)) FileWriteln(Out, MenuTitle) FileWriteln(Out, ModifyPassWord) FileWriteln(Out, ExitToDosPassWord) FileWriteln(Out, Str(ChoicePtr)) FileWriteln(Out, MenuHeader) FileWriteln(Out, BottomOfScreenText) FileWriteln(Out, Str(BorderStyle)) FileWriteln(Out, Str(UtilBorderStyle)) FileWriteln(Out, Str(TitleBorderStyle)) FileWriteln(Out, Str(MenuForeColor)) FileWriteln(Out, Str(MenuBackColor)) FileWriteln(Out, Str(MenuBorderForeColor)) FileWriteln(Out, Str(MenuBorderBackColor)) FileWriteln(Out, Str(MenuInverseForeColor)) FileWriteln(Out, Str(MenuInverseBackColor)) FileWriteln(Out, Str(MenuHeaderForeColor)) FileWriteln(Out, Str(MenuHeaderBackColor)) FileWriteln(Out, Str(MainScreenForeColor)) FileWriteln(Out, Str(MainScreenBackColor)) FileWriteln(Out, Str(UtilForeColor)) FileWriteln(Out, Str(UtilBackColor)) FileWriteln(Out, Str(UtilHeaderForeColor)) FileWriteln(Out, Str(UtilHeaderBackColor)) FileWriteln(Out, Str(UtilBorderForeColor)) FileWriteln(Out, Str(UtilBorderBackColor)) FileWriteln(Out, Str(UtilInverseForeColor)) FileWriteln(Out, Str(UtilInverseBackColor)) FileWriteln(Out, Str(TitleForeColor)) FileWriteln(Out, Str(TitleBackColor)) FileWriteln(Out, Str(TitleHeaderForeColor)) FileWriteln(Out, Str(TitleHeaderBackColor)) FileWriteln(Out, Str(TitleBorderForeColor)) FileWriteln(Out, Str(TitleBorderBackColor)) FileWriteln(Out, Str(TitleInverseForeColor)) FileWriteln(Out, Str(TitleInverseBackColor)) FileWriteln(Out, Str(TitleRow)) FileWriteln(Out, Str(MsgRow)) if ExplodeStatus FileWriteln(Out, 'TRUE') else FileWriteln(Out, 'FALSE') endif if ShadowStatus FileWriteln(Out, "TRUE") else FileWriteln(Out, "FALSE") endif if SoundStatus FileWriteln(Out, "TRUE") else FileWriteln(Out, "FALSE") endif if UtilExplodeStatus FileWriteln(Out, 'TRUE') else FileWriteln(Out, 'FALSE') endif if UtilShadowStatus FileWriteln(Out, "TRUE") else FileWriteln(Out, "FALSE") endif if UtilSoundStatus FileWriteln(Out, "TRUE") else FileWriteln(Out, "FALSE") endif if TitleExplodeStatus FileWriteln(Out, 'TRUE') else FileWriteln(Out, 'FALSE') endif if TitleShadowStatus FileWriteln(Out, "TRUE") else FileWriteln(Out, "FALSE") endif if TitleSoundStatus FileWriteln(Out, "TRUE") else FileWriteln(Out, "FALSE") endif i = 1 While i <= 27 if Menu[i].Inuse Trim(Menu[I].Description) Trim(Menu[I].PassWord) FileWriteln(Out, Menu[I].Description) FileWriteln(Out, Menu[I].Path) FileWriteln(Out, Menu[I].name) FileWriteln(Out, Menu[I].PassWord) FileWriteln(Out, Menu[I].Parameters) if Menu[I].Pause FileWriteln(Out, 'TRUE') else FileWriteln(Out, 'FALSE') endif endif i = i + 1 EndWhile FileWriteln(Out, BatEditor) FileWriteln(Out, DosUtilPassword) FileWriteln(Out, ConfigPassword) FileWriteln(Out, Str(BackDropCharacter)) FileClose(Out) EraseTopWindow UseArrows On EndProc ;SaveChanges Procedure AskSave if Not FileSaved if AskYesNo("Menu not saved! Save Changes?", 18) SaveChanges endif endif EndProc ;--- { END of FILE I/O } { Utilities } Procedure Abort ( ErrMsg ) ClearScreen ClearScreenOnExit Off Writeln("Error :") Writeln( ErrMsg ) ExitMenu EndProc ;Abort ;--- Procedure AskYesNo (Question, Row) var YesNo MakeBox('',(34 - (Length(Question) / 2)), Row, Length(Question) + 14, 3, Util) UseArrows Off Cursor On Write ' ',Question,' (Y/N) ' YesNo = GetKey YesNo = YesNo = 'Y' if YesNo Write 'Yes' else Write 'No' endif Wait 50 EraseTopWindow UseArrows On Return YesNo EndProc ;AskYesNo ;--- Procedure ChooseColors (OrigX, OrigY, VType) Var X Y Ch MakeBox('Pick Color', 8 , 0, 20, 19) UseArrows Off Cursor Off Y = 0 While Y < 16 X = 0 While X < 16 WriteColor(4, X, Y) X = X + 1 EndWhile Y = Y + 1 EndWhile X = OrigX Y = OrigY WriteColor(254, X, Y) repeat GotoXY(X + 2, Y + 2) Ch = GetKey if (X = OrigX) and (Y = OrigY) WriteColor(254,X,Y) else WriteColor(4,X,Y) endif if Ch = Char(Larr) then X = ((X + 15) and 15) if Ch = Char(Rarr) then X = ((X + 1) and 15) if Ch = Char(Uarr) then Y = ((Y + 15) and 15) if Ch = Char(Darr) then Y = ((Y + 1) and 15) WriteColor(15,X,Y) if Ch = Esc X = OrigX Y = OrigY endif until ((Ch = Esc) or (Ch = Char(13))) EraseTopWindow if VType = 1 MenuForeColor = X MenuBackColor = Y endif if VType = 2 MenuBorderForeColor = X MenuBorderBackColor = Y endif if Vtype = 3 MenuInverseForeColor = X MenuInverseBackColor = Y endif if Vtype = 4 MenuHeaderForeColor = X MenuHeaderBackColor = Y endif if Vtype = 5 MainScreenForeColor = X MainScreenBackColor = Y endif if Vtype = 6 ClockForeColor = X ClockBackColor = Y endif if Vtype = 9 UtilForeColor = X UtilBackColor = Y endif if Vtype = 10 UtilBorderForeColor = X UtilBorderBackColor = Y endif if Vtype = 11 UtilInverseForeColor = X UtilInverseBackColor = Y endif if Vtype = 12 UtilHeaderForeColor = X UtilHeaderBackColor = Y endif if Vtype = 13 TitleForeColor = X TitleBackColor = Y endif if Vtype = 14 TitleBorderForeColor = X TitleBorderBackColor = Y endif if Vtype = 15 TitleInverseForeColor = X TitleInverseBackColor = Y endif if Vtype = 16 TitleHeaderForeColor = X TitleHeaderBackColor = Y endif UseArrows On EndProc ;ChooseColors ;--- Procedure ChooseProgram (SubDir) var BoxDim Progs ProgChoice TotalProgs LongestProgLine TmpSt TmpSt = ' D.EXE ' + SubDir + ' /F/R/O > PROGS.PIC' MessageBox( '', 'Scanning Programs', 35,0) ClearScreenFirst Off UseCommand On Execute TmpSt ReadTextFile 'PROGS.PIC' Progs DelFile 'PROGS.PIC' TotalProgs = NumberOfElements(Progs) LongestProgLine = LongestLine EraseTopWindow if TotalProgs > 0 BoxDim[3] = Min(LongestProgLine + 6,ScreenWidth - 6) BoxDim[4] = Min(TotalProgs + 2,ScreenHeight - 4) BoxDim[1] = Max(Min(45,ScreenWidth - BoxDim[3]),1) BoxDim[2] = Max(Min(7,ScreenHeight - BoxDim[4]),4) DrawBox BoxDim[1] BoxDim[2] BoxDim[3] BoxDim[4] ProgChoice = PickOne Progs EraseTopWindow endif Return ProgChoice EndProc ;ChooseProgram ;--- Procedure EditBat Var %Exec ClearScreenOnExit On ClearScreenFirst On {Check to See if user has already specified bat file } if Not (Right(Menu[Index].Name, 3) = "BAT") Menu[Index].Name = UpperCase(ReadTextLine('Enter BAT File Name', Menu[Index].Name, 50, 16)) endif if LastKey <> Esc %Exec = BatEditor + " " + Menu[Index].Name Execute(%Exec) endif EndProc ;EditBat ;--- Procedure EnterPassWord (pass, row) Var LY TX RY BX TmpSt Trim(Pass) if Not (Length(pass) > 0) then Return true Security On if Length(pass) < 20 RY = 21 else RY = Length(pass) + 1 endif TX = 6 LY = 3 BX = 3 MakeBox( 'PassWord', LY, TX, RY, BX, Util) Write ' ' TmpSt = Readln Security Off EraseTopWindow if TmpSt = pass Return True else Return False endif EndProc ;EnterPassWord ;--- Procedure Error (ErrMsg) BoxHeaderColor White Blue BoxBorderColor White Red BoxInsideColor White Red BoxHeader = " Error " DoubleLineBox DrawBox (ScreenWidth - Length(ErrMsg) /2) 10 (Length(ErrMsg) + 4) 3 WriteCenter (ErrMsg) Write(char(7)) Wait(250) EraseTopWindow SingleLineBox EndProc ;Error ;--- Procedure MainColors Explode ExplodeStatus Sound SoundStatus Shadow ShadowStatus if BorderStyle = None then NoBoxBorder if BorderStyle = Single then SingleLineBox if BorderStyle = Double then DoubleLineBox if BorderStyle = Block then BlockBox BoxHeaderColor MenuHeaderForeColor MenuHeaderBackColor BoxInsideColor MenuForeColor MenuBackColor BoxBorderColor MenuBorderForeColor MenuBorderBackColor EndProc ;MainColors ;--- Procedure UtilColors Explode UtilExplodeStatus Sound UtilSoundStatus Shadow UtilShadowStatus if UtilBorderStyle = None then NoBoxBorder if UtilBorderStyle = Single then SingleLineBox if UtilBorderStyle = Double then DoubleLineBox if UtilBorderStyle = Block then BlockBox BoxHeaderColor UtilHeaderForeColor UtilHeaderBackColor BoxInsideColor UtilForeColor UtilBackColor BoxBorderColor UtilBorderForeColor UtilBorderBackColor EndProc ;UtilColors ;--- Procedure TitleColors Explode TitleExplodeStatus Sound TitleSoundStatus Shadow TitleShadowStatus if TitleBorderStyle = None then NoBoxBorder if TitleBorderStyle = Single then SingleLineBox if TitleBorderStyle = Double then DoubleLineBox if TitleBorderStyle = Block then BlockBox InverseColor TitleInverseForeColor TitleInverseBackColor BoxHeaderColor TitleHeaderForeColor TitleHeaderBackColor BoxInsideColor TitleForeColor TitleBackColor BoxBorderColor TitleBorderForeColor TitleBorderBackColor EndProc ;TitleColors ;--- Procedure MakeBox(Header, Col, Row, Wid, Depth, ColorSet) {0 for Col will center box horizontaly} if Col = 0 then Col = (ScreenWidth - (Wid - 2)) /2 {0 for Row will center box vertically} if Row = 0 then Row = ((ScreenHeight - Depth) /2) + 1 if Header > '' then BoxHeader = Char(221) + ' ' + Header + ' ' + char(222) if ColorSet = MMenu MainColors else if ColorSet = Util UtilColors else if ColorSet = Title TitleColors endif endif endif DrawBox(Col, Row, Wid, Depth) if ColorSet = MMenu InverseColor MenuInverseForeColor MenuInverseBackColor else InverseColor UtilInverseForeColor UtilInverseBackColor endif EndProc ;MakeBox ;--- Procedure MessageBox(Header, Message, Col, Row) MakeBox(Header, Col, Row, (Length(Message) + 4), 3, Util) WriteCenter(Message) EndProc ;MessageBox ;--- Procedure ReadTextLine (Header, Suggestion, MaxAnswerLength, Row) var St Trim(Header) MakeBox( Header, 0, Row, (MaxAnswerLength + 2), 3, Util) Write ' ' Cursor InputString = Suggestion St = Readln EraseTopWindow if LastKey <> Char(13) Return Suggestion else Return St endif EndProc ;ReadTextLine ;--- Procedure RedrawSelections Var x MakeBox( 'Edit', 0, 6, 78, 15, Util) UseArrows On x = 1 While x < 14 GotoXY(1, x) if Menu[x].InUse Write(' ',Menu[x].Description) else Write(" " , Char(x + 64) , " - ") endif GotoXY(39,x) if Menu[x + 13].InUse Write(Menu[x + 13].Description) else Write(Char(x + 77) , " - ") endif x = x + 1 EndWhile EndProc ;RedrawSelections ;--- Procedure Update ChoicePtr = 0 LongestItem = 0 I = 1 While I < 27 if Menu[I].InUse ChoicePtr = ChoicePtr + 1 if Length(Menu[I].Description) > LongestItem LongestItem = Length(Menu[I].Description) endif ScreenArr[ChoicePtr] = Menu[I].Description endif I = I + 1 EndWhile if ChoicePtr < 10 Height = ChoicePtr + 2 Width = LongestItem + 6 else Height = (((ChoicePtr / 2) + (ChoicePtr Mod 2)) + 2) Width = (LongestItem * 2) + 8 endif TitleRow = (((ScreenHeight - Height) / 2) - 3) MsgRow = ((TitleRow + 5) + Height) EndProc ;Update ;--- Procedure WriteColor (Ch, X, Y) TextColor(X, Y) GotoXY(X + 2, Y + 2) Write(Char(Ch)) EndProc ;WriteColor ;--- Procedure WriteStatus (Msg, Row) GotoXY(1, Row) Write(Msg) GotoXY(67, Row) Write("]") EndProc ;WriteStatus ;--- { End of Utilites } { Support Routines } Procedure BuildBat (Num) Var B, I, Ptr, FP AskSave if EnterPassWord (Menu[Num].PassWord, 19) if left(Menu[Num].Name,1) = '^' ClearScreenFirst Off ClearScreenOnExit Off B = 'SET MENU=' + Right(Menu[Num].Name, Length(Menu[Num].Name) - 1) Bat(B) Bat('MARX LEVEL1') Exitmenu endif if ReadEnv('PROMPT') = '' Bat ('SET PROMPT=$P:') endif Bat ('CD ' + Menu[Num].Path) B = Menu[Num].Name + " " + Menu[Num].Parameters Bat(B) if Menu[Num].Pause Then Bat("Pause") B = %ThisDrive Bat(B) B = "CD " + %ThisDirectory Bat(B) ExitMenu endif EndProc ;BuildBat ;--- Procedure DrawTop ClockPos 0, 0 TextColor MainScreenForeColor MainScreenBackColor if ColorScreen ClearScreen BackDropCharacter else ClearScreen BackDropCharacter endif TextColor UtilForeColor UtilBackColor MakeBox( '', 1, 1, ScreenWidth, 4, Title) ClockColor TitleForeColor TitleBackColor ClockPos 3, 2 GotoXY 53, 1 Writeln ProgramName ' ' Version WriteCenter(MenuTitle) EndProc ;DrawTop ;--- Procedure DrawBottom (s) MakeBox( '', 1, ScreenHeight - 3, ScreenWidth, 4, Title) WriteCenter(s) Writeln WriteCenter BottomOfScreenText EndProc ;DrawBottom ;--- Procedure Draw Var I, J, Indent MainColors MakeBox( MenuHeader, 0, 0, Width, Height, MMenu) if ChoicePtr < 10 I = 1 While I < ChoicePtr Writeln(' ', ScreenArr[I]) I = I + 1 EndWhile Write(' ', ScreenArr[I]) else I = 1 J = ChoicePtr + 1 / 2 + 1 Indent = LongestItem + 5 While I <= (ChoicePtr + 1 / 2) Write ' ' ScreenArr[I] GotoXY(Indent,I) if J <= ChoicePtr then Write ScreenArr[J] if I <> (ChoicePtr + 1 / 2) then Writeln I = I + 1 J = J + 1 EndWhile endif UseArrows On EndProc ;Draw ;--- Procedure Help Var Key HelpFile UseArrows Off HelpFile = ExistOnPath 'LITE.HLP' if HelpFile > '' MakeBox( '* Help *', 5, 8, 70, 12, Util) ViewTextFile HelpFile else KeyHelp endif UseArrows On EndProc ;Help ;--- Procedure InitilizeData VerNo = Version ChoicePtr = 0 Width = 25 Height = 3 ExplodeStatus = False ShadowStatus = False SoundStatus = False TitleExplodeStatus = False TitleShadowStatus = False TitleSoundStatus = False UtilExplodeStatus = False UtilShadowStatus = False UtilSoundStatus = False BorderStyle = Block TitleBorderStyle = Block UtilBorderStyle = Block BottomOfScreenText = CopyRightMsg MenuHeader = '' MenuTitle = 'Your Company Title Here' ModifyPassWord = '' ExitToDosPassWord = '' DosUtilPassword = '' ConfigPassword = '' BorderStyle = Block MenuForeColor = Grey MenuBackColor = Blue MenuBorderForeColor = Cyan MenuBorderBackColor = Blue MenuInverseForeColor = Yellow MenuInverseBackColor = Mag MenuHeaderForeColor = White MenuHeaderBackColor = Mag MainScreenForeColor = Red MainScreenBackColor = Blue UtilForeColor = Yellow UtilBackColor = Brown UtilBorderForeColor = LRed UtilBorderBackColor = Brown UtilInverseForeColor = White UtilInverseBackColor = Green UtilHeaderForeColor = Yellow UtilHeaderBackColor = Mag TitleForeColor = Yellow TitleBackColor = Brown TitleBorderForeColor = Green TitleBorderBackColor = Brown TitleInverseForeColor = Yellow TitleInverseBackColor = Red TitleHeaderForeColor = White TitleHeaderBackColor = Mag TitleRow = 3 MsgRow = 20 BatEditor = 'me.exe' BackDropCharacter = 178 ConBlankTime = 3 ConLockWord = '' ConBlankMessage = "" EndProc ;InitilizeData ;--- Procedure Leave AskSave if ExitToDosPassWord > '' if EnterPassWord (ExitToDosPassWord, 19) then ExitMenu else if AskYesNo('Exit to DOS?', 6) then ExitMenu endif EndProc ;Leave ;--- Procedure ModifyMenuChoice (choice) Var Select NewChoice Response FileSaved = False Index = ord(choice) - 64 if Not Menu[index].InUse Menu[index].Description = '' Menu[index].Path = '' Menu[index].Name = '' Menu[index].Password = '' Menu[index].Parameters = '' Menu[index].Pause = False endif if Index < 14 MakeBox( 'Edit Menu Item', 46, 8, 26, 6, Util) else MakeBox( 'Edit Menu Item', 9, 8, 26, 6, Util) endif Writeln(" A - Screen Text") Writeln(" B - Program") Writeln(" C - Delete choice") Write (" D - Advanced Options") UseArrows On Select = GetKey While Select <> ESC if Select = 'A' FileSaved = False if Not Menu[Index].Inuse NewChoice = True else NewChoice = False endif Response = Menu[Index].Description Delete(Response,1,4) Response = ReadTextLine('Screen Text', Response, 30, 10) Trim(Response) Menu[Index].Description = Choice + " - " + Response if Response > '' Menu[Index].InUse = True if (Length(Menu[Index].Description) > LongestItem) LongestItem = Length(Menu[Index].Description) endif if NewChoice Menu[Index].Path = ChooseDirectory if Length(Menu[Index].Path) > 0 Menu[Index].Name = ChooseProgram (Menu[Index].Path) endif endif else Menu[Index].InUse = False endif endif if Select = 'B' FileSaved = False Menu[Index].Path = ChooseDirectory if Length(Menu[Index].Path) > 0 Menu[Index].Name = ChooseProgram (Menu[Index].Path) endif endif if Select = 'C' if AskYesNo('Are you sure?', 0) FileSaved = False Menu[Index].InUse = False Menu[index].Description = '' Menu[index].Path = '' Menu[index].Name = '' Menu[index].Password = '' Menu[index].Parameters = '' Menu[index].Pause = False EraseTopWindow Return endif endif if Select = 'D' then AdvancedOptions Select = GetKey EndWhile EraseTopWindow EndProc ; Modify ;--- Procedure NoChoices Var Select FileSaved = False MakeBox( '', 0, 0, 50, 8, MMenu) WriteCenter('You have no menu choices available!') Writeln Writeln WriteCenter('Press F10 to setup your menu.') Writeln Writeln WriteCenter('Press ESC to exit to DOS.') UseArrows Off Select = ReadKey While (Select <> F10) or (Select <> ESC) if Select = F10 EraseTopWindow Edit Return endif if Select = ESC then Exitmenu Select = ReadKey EndWhile EraseTopWindow EndProc ;NoChoices ;--- Procedure UpdateScreen EraseTopWindow EraseTopWindow EraseTopwindow DrawTop DrawBottom ('F1 - Help * F2 - Save * F3 - DOS Utilities * F10 - Setup') Draw EndProc ;UpdateScreen ;--- Procedure ViewCurrentStatus Var Key UseArrows Off MakeBox('Current Status', 0, 8, 70, 9, Util) WriteStatus(" Password to Edit Menu ..................[" + ModifyPassWord, 1) WriteStatus(" Password to Exit to DOS ................[" + ExitToDosPassWord,2) WriteStatus(" Password for DOS Utilities .............[" + DosUtilPassword,3) WriteStatus(" Password for Configuration .............[" + ConfigPassword,4) WriteStatus(" Batch File Editor ................................[" + BatEditor,5) Writeln Writeln WriteCenter("<*> Press any key to continue <*>") Key = GetKey EraseTopWindow UseArrows ON EndProc ;ViewCurrentStatus ;--- Procedure GetKey Var Tmp Repeat Tmp = UpperCase(ReadKey) if Tmp = '?' then KeyHelp if Tmp = F1 Help else if (Tmp = F2) SaveChanges if MMActive EraseTopWindow Draw endif else if Tmp = AltX if EnterPassWord(ExitToDosPassWord, 6) ExitMenu else if MMActive EraseTopWindow Draw endif endif else Return Tmp endif endif endif Tmp = '' Until Tmp > '' EndProc ;--- Procedure KeyHelp MakeBox(' Mini Help ', 0, 0, 31, 14, Util) Writeln Writeln(' F1 | Help') Writeln(' F2 | Save') Writeln(' F3 | Dos Utilities') Writeln(' F4 | Menu Utilities') Writeln(' F10 | Modify Menu') Writeln(' Alt S | Screen Setup') Writeln(' Alt X | Immediate Exit') Writeln(' ? | This help screen') Writeln Write (' <*> Press any key <*>') WaitOrKbdReady (4500) EraseTopWindow if MMActive EraseTopWindow Draw endif EndProc ;KeyHelp Procedure Initialize var BatFile MenuPath BatName BlankTime = 10 Cursor Off BrightBackground FileSaved = True if pos('MARXMENU',ParamStr(0)) > 0 then return if ParamStr(2) <> 'RUNMENU.BAT' if ExistOnPath 'MENU.BAT' = '' MenuPath = PathPart(ParamStr(0)) BatName = CleanFileName(MenuPath + '\' + 'MENU.BAT') FileAssign(BatFile,BatName) FileCreate(BatFile) if DosVersionString >= '3.30 FileWriteln(BatFile,'@ECHO OFF') else FileWriteln(BatFile,'ECHO OFF') endif FileWriteln(BatFile,ParamStr(0) + ' RUNMENU.BAT') FileWriteln(BatFile,'IF ERRORLEVEL 253 GOTO E') if DosVersionString >= '3.30 FileWriteln(BatFile,'CALL RUNMENU') else FileWriteln(BatFile,'COMMAND /C RUNMENU') endif FileWriteln(BatFile,BatName) FileWriteln(BatFile,':E') FileClose(BatFile) endif FileAssign(BatFile,'RUNMENU.BAT') FileCreate(BatFile) FileWriteln(BatFile,'Echo Off') FileWriteln(BatFile,'Cls') FileWriteln(BatFile,'ECHO In the future, type MENU to start instead of LITE.') FileWriteln(BatFile,'Pause') FileWriteln(BatFile,'Menu') FileClose(BatFile) StuffKBD = 'RUNMENU' + CR exitmenu endif EndProc