Dr. Bob's Menu Helper Dr. Bob's Menu Maker (C) Copyright 1989 W.D.Parks All Rights Reserved 01 Aug 1989 MENU HELPER: Provides a Quick Menu from which to execute Programs. MENU MAKER: Create Menued-List of selectable file for Menu Helper. MENU HELPER Menu Helper is a short-n-sweet menu program that will allow you to run a program from a central menu. No more hunting, listing, and searching directory paths to find out where that 'special' program is. You can have eight (8) programs available at the touch of a button (mouse button or keyboard key). Additional helpful options provide for running ANY program not listed in the menu by using the file selector, using a different menu file or switching to a "pre-selected" menu file. DB's Menu Helper requires less than 7k bytes of memory (7000 to be exact) and that's AFTER loading not before. No hoggish memory grabber here. Just a plain-n-simple file executer. PRG files are the main intention for DB's Menu Helper, although TOS and TTP files can also be listed. No command-line is passed to the selected program nor any search path. Prior to execution, DB's Menu Helper will make the pathspec of the selected program become the DEFAULT pathspec. Upon exit, the original default pathspec will be restored. Menu Helper uses a standard ascii text file as it's source of information for the selecatable path\filenames that will be displayed. This ascii file is referred to as a "MEN" file due to it's extension of ".MEN". On power-up, PRGMENU.MEN is searched for by the Menu Helper and it's contents used as the menu selections. If not found, another MEN file may be loaded (or any MEN file in any other path). A MENu file can easily be created by any editing program that can produce a standard (plain vanilla) ascii output. No formatting or coding is needed (it would cause havoc anyway). Three special operations can be specified within the MEN file. Title, Alternate MEN filename, and Reset on exit. For simplicity, we'll look first at a plain, no frills MEN file. _________________________________________________________ line#1 -> |C:\CANDYST.prg ;uppercase or lowercase is ok |D:\jujubees.prg ;notes can follow if separated by a space |C:\WORK\PAYROLL.prg |E:\INTHE\LANDOF\NOD.prg |F:\HOW\MANY\DRIVES\ARE\THERE.prg |A:\MYGAME.prg |A:\JOKES.PRG line#8 -> |C:\UTILS\MENMAK.prg | Often, games will scramble something in memory and do not always leave a clean desktop... It would be recommended to reset the ST before trying to run another program. Hence, the RESET operator: ! Preceeding a menu selection with an exclamation point instructs the Menu Helper to run the program normally, but to do a coldboot when that program exits... _________________________________________________________ line#1 -> |C:\SWEETS.prg |D:\jujubees.prg |C:\Gummy\Bears\GUMGAME.prg |!E:\NEVER\NEVER\LAND.prg ;this will reset on exit |!F:\Winkin\Blinkin\Nod.prg ;so will this one |A:\MYGAME.prg |A:\HARYUCK.PRG line#8 -> |A:\MARY.prg | Hey... it'd be nice to show a little title in that spiffy box that's already there! Ok. The first line in a MEN file can be used as a short title. Preceed the line with an asterik: * Like so: _________________________________________________________ line#1 -> |* Utilities ;18 characters max line#2 -> |C:\ASMBLIT.prg |D:\BASICIT.prg |C:\C_IT.prg |C:\UTILS\ARKKER.prg |!C:\UTILS\OB.prg ;this 'un will reboot |C:\LOOKIT.prg |C\UTILS\DUCK.tos line#9 -> |A:\MARY\HARTMAN\LOUISE\LASSNER.prg Another menu file can be loaded by clicking on the title within DB's Menu Helper. The file_selector box allows you to pick from wherever you wish. - - - - - - - A step-saver, the "Alternate Menu" or "Chained" menu will auto- matically load a pre-defined MEN file. This is defined here, with the Alt-Menu operator: @ thus: _________________________________________________________ line#1 -> |* Utilities ;18 characters max |@C:\Graphics.men ;new menu to chain in... line#3 -> |C:\ASMBLIT.prg |D:\BASICIT.prg |C:\C_IT.prg |C:\UTILS\ARKKER.prg |!C:\UTILS\OB.prg ;this 'un will reboot |C:\LOOKIT.prg |C\UTILS\DUCK.tos line#10 ->|A:\MARY\HARTMAN\LOUISE\LASSNER.prg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Lastly, a few technical points: DB's MENU Helper uses only the straight forward PEXEC calls to execute the selected program. The command_line is nulled, as is the enviornment string. Return codes other than 0 or 1 are reported and require only a keypress to return to the menu. Exactly 98 bytes per menu line (98*8=784 bytes) are set aside to be used as a mini buffer. A MEN file may be longer than this but only the first 8 items are active, plus the title & alt_menu. Anything else will be discarded. This is in an attempt to keep DB's Menu Helper minimal in size... -------------------------------------------------------------------------- Ver 1.19 TOS files can now be fed a command_line (or GEM files, if ya want)... Pressing the "C" key will toggle a flag that prompts you for the command_line you wish to send to the TOS file... Pressing "C" again will turn off this feature. Ver 1.19+ After giving this program to a friend who tried to run it from drive B: with the menu set up to run programs right off the same diskette but with a MEN file that specified drive A: in each line (ie A:\READBOOT.prg) I discovered another "iconvienience". It would not run the programs that were on the same diskette cuz the menu file explicity stated A: and not the B: drive... so.... When PRGMENU finds a menu line that specifies either A:... or B:... it will ASSUME that the DEFAULT drive is what the user wants... (the default drive is the drive that PRGMENU was run from. I say "hopefully" because there are _some_ other SHELLs that may not perform this process properly) If you always run PRGMENU from drive A:, then you'll experience no problem. AND... if you put that same diskette (complete with the files that are in it's MEN file) into drive B: and run PRGMENU, you will now ALSO not experience any problem. This feature ONLY affects drives A: and B: it will NOT affect C: etc.