home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff225.lzh / MyMenu / MyMenu.doc < prev    next >
Text File  |  1989-06-24  |  5KB  |  138 lines

  1. MyMenu is a program to allow you to create your own menus in the WorkBench
  2. to run your own commands.  This can save the hassle of opening up lots
  3. of drawers to get to the command you want.  MyMenu will allow you to execute
  4. both CLI and WorkBench programs, and is configured with a normal text
  5. file.  Hopefully, this program will be obsolete when WorkBench 1.4
  6. is released, since I hear this capability may be added.
  7.  
  8. Building:
  9.  
  10.   There is a supplied Makefile, which works with Manx 3.6, and a version
  11.   of make from a Fish disk (I don't remember which one).  The Makefile
  12.   should work with most make programs.  I haven't tried to get this
  13.   to work with 16-bit integers, or to work with Lattice (although, I
  14.   would like this).
  15.  
  16.   There are some defines in MyMenu.h that can be customized.  DO_WB
  17.   determines if support for WorkBench programs is included.  Undefining
  18.   this can save a lot of space if you don't need this option.  DO_PATH
  19.   if defined will compile in code for path searching for commands.
  20.   Currently, it is undefined.
  21.  
  22. Installation:
  23.  
  24.   Copy MyMenu-Handler to the L: directory.  MyMenu will also look
  25.   for this file in the current directory if it does not exist in
  26.   the L: directory.
  27.  
  28.   Create the file S:MyMenu.conf.  The format of this file is described
  29.   later.
  30.  
  31. Running:
  32.  
  33.   Step one is to start up the Workbench!
  34.   
  35.   The command "MyMenu" will load and start up the handler process.
  36.   Menus should now appear in the WorkBench menu strip.
  37.   
  38.   Running MyMenu while the handler is already loaded will cause
  39.   it to re-parse the configuration file and rebuild the menus.
  40.  
  41.   The command "MyMenu quit" will terminate and unload the handler
  42.   process.
  43.  
  44. Configuration file:
  45.  
  46.   The configuration file is read in when you run MyMenu.  It is
  47.   looked for in the S: directory, and in the current directory in
  48.   that order.
  49.  
  50.   The configuration file defines the menus you want, and what commands
  51.   they will run.  You may put carriage returns between keywords, but
  52.   you cannot put a carriage return in the middle of a command.
  53.   Comments begin with a #, and continue until the end of the line.
  54.   Upper and lowercase does not make a difference.
  55.  
  56.   COLOR n
  57.  
  58.     This will set the foreground pen color for new menus.  You can
  59.     change this as often as you want.  The arguments is number that is
  60.     the pen number to use.  The default is 2 (black).
  61.  
  62.   MENU [<command-char>] menu-name item-name [sub-item-name] | command-def
  63.  
  64.     Defines a new menu.  Each menu definition must have a menu-name and
  65.     an item-name.  A sub-item-name is optional.  If any of these names
  66.     contain whitespace, enclose the name in double quotes, or precede
  67.     the whitespace character with a backslash (\).  A command character
  68.     may be defined for the menu item by putting the character after the
  69.     MENU keyword and surround it with <>'s.
  70.  
  71.     Separate the menu definition and the command definition with a vertical
  72.     bar (|).  After the bar, you can have the keywords CLI or WB, to
  73.     specify that the command is a CLI or WorkBench command.  Everything
  74.     after WB until the end of the line is taken to be the command.
  75.     Everything after CLI until a space or end of the line is taken to be
  76.     the command.  Everything else will be passed as arguments to the
  77.     CLI command.  Do not include redirection in a CLI command.
  78.  
  79.   Examples:
  80.  
  81.     menu Games Tetrix | WB dh0:games/tetrix
  82.  
  83.       This will define a menu "Games", with a menu item "Tetrix".
  84.       If this is selected, the command "dh0:games/tetrix" will be run
  85.       as a WorkBench program.
  86.  
  87.     menu Games "Black Box" | WB df0:Black Box
  88.  
  89.       This will define a menu item "Black Box" under the menu "Games".
  90.       The menu Games will already exist from the previous example, and
  91.       will now contain "Tetrix" and "Black Box" as items.  The command
  92.       to be run is "df0:Black Box" (Box is not an argument).
  93.  
  94.     color 3
  95.     menu  Utilities DMouse "Start DMouse" | c:DMouse
  96.     menu  Utilities DMouse "Quit DMouse" | c:DMouse quit
  97.  
  98.       This will define two sub menu items (drawn in yellow).  The second
  99.       command has an argument.
  100.  
  101. Future plans and hopeless dreams:
  102.   AREXX support.
  103.   Fix up path searching.
  104.   A better parser.
  105.   Support for graphical menu items.
  106.  
  107. Limitations, bugs, and other wierd things:
  108.   Path searching does not work.  Do not compile this in.
  109.   I would appreciate it if someone can find the problem, since I
  110.   am stuck.  Details are in DoRun.c.
  111.  
  112.   New preferences causes menus to disappear (but handler is not unloaded).
  113.   The menus can be rebuilt by running MyMenu again.
  114.  
  115.   Redirection can not be done for CLI programs, since the code already
  116.   does redirection to and from NIL:.
  117.  
  118.   Line limit of 256 characters in configuration file.
  119.  
  120. Acknowledgements:
  121.  
  122.   I have borrowed ideas and code snipits from other public domain
  123.   programs.  I have also received help directly from some people.
  124.   I would like to thank those people (whose names I remember):
  125.   
  126.     Matt Dillon        - Ideas for menu building and how to load in the
  127.                           handler were taken from DME and DMouse.
  128.     Peter da Silva    - Ideas taken from wblaunch program.
  129.     Rob Peck        - Some ideas and help.
  130.     Davide Cervone    - LOTS of ideas taken from MonIDCMP.
  131.  
  132. Signature:
  133.  
  134.   Darin Johnson
  135.   darin@laic.UUCP
  136.   {leadsv!laic!darin@pyramid.pyramid.com}
  137.   (415) 368-0972
  138.