home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / TURBOPAS / EXECMENU.ZIP / EXECMENU.DOC < prev    next >
Encoding:
Text File  |  1988-01-19  |  16.7 KB  |  544 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.                              E X E C U T I V E   M E N U
  29.  
  30.                                    VERSION   1.00
  31.  
  32.                                          by
  33.  
  34.                                    Leroy B. Inman  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.                                  TABLE OF CONTENTS
  41.  
  42.  
  43.  
  44.             INTRODUCTION                                               2
  45.  
  46.             Benefits and Advantages                                    2
  47.  
  48.             How Does ExecMenu Work                                     2
  49.  
  50.             HOW TO USE ExecMenu                                        3
  51.  
  52.                 Setting up ExecMenu for the first time                 3
  53.  
  54.                 ExecMenu Menu Definition File (MDF)                    4
  55.  
  56.                 How to run ExecMenu                                    5
  57.  
  58.                 Functional Characteristics                             5
  59.  
  60.                 Uses and Performance for Floppy Diskette Systems       5
  61.  
  62.             REFERENCE SECTION                                          6
  63.  
  64.                 Example of ExecMenu Menu Definition File               6
  65.  
  66.                 Example of AUTOEXEC.BAT                                7
  67.  
  68.                 Example of AUTO.BAT                                    7
  69.  
  70.                 Example of Configuration File                          7
  71.  
  72.                 Menu Definition File Functions                         7
  73.  
  74.                     ( % ) - Title                                      7
  75.  
  76.                     ( * ) - Option                                     8
  77.  
  78.                     ( ? ) - Option Help                                8
  79.  
  80.                     ( ^ ) - Password                                   8
  81.  
  82.                     ( + ) - Batch DOS Commands                         8
  83.  
  84.                     ( . ) - Comments                                   8
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.                                           i
  95.  
  96.  
  97.  
  98.                                    EXECUTIVE MENU
  99.                                     Version 1.00
  100.                                          by
  101.                                    Leroy B. Inman  
  102.  
  103.  
  104.  
  105.  
  106.  
  107. INTRODUCTION
  108.  
  109.      ExecMenu is  the solution  to the  problem of  learning  all  the  DOS
  110. commands required  to access many different application programs. No longer
  111. will the user be required to type in a list of commands to find the program
  112. they are  looking for. With a single press of a key, almost any application
  113. program can be made available.
  114.  
  115.      ExecMenu provides  the user  with an  easy to  read and understandable
  116. menu of  options to  choose from.  It automatically  executes the  commands
  117. required to  bring the  selected menu  option  to  the  user's  fingertips.
  118. ExecMenu provides  the user  with  the  capability  to  set  up  their  own
  119. customized menu  systems. The  user can  define the  menu titles,  the menu
  120. options displayed,  and DOS  commands required  to carry  out each of these
  121. menu options.
  122.  
  123.  
  124. Benefits and Advantages
  125.  
  126.         -ExecMenu can be memory resident, requiring the loading of the Menu
  127.           program and associated files only once.
  128.         -The software is entirely written in Turbo Pascal.
  129.         -The program requires only 18,192 bytes of storage space.
  130.         -Password protection on any or all menu options.
  131.         -Ability to define eight individual menus.
  132.         -Eight menu options per menu.
  133.         -Individually titled menus, automatically centered.
  134.         -Compatible with floppy diskette or fixed disk systems.
  135.         -Help messages with each option.
  136.         -Many individual  features that  can be  changed  in  the  constant
  137.           declarations section of the source code.
  138.         -Current date and time displayed.
  139.         -Multiple keys perform the same function for logical selection.
  140.  
  141.  
  142. How Does ExecMenu Work
  143.  
  144.      ExecMenu is  designed to  be the direct interface with the user, so as
  145. not to  allow the  user direct  access to  DOS itself. The software reads a
  146. Menu Definition  File containing  the information needed to display options
  147. for the user to choose from and the DOS commands to reach these options.
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.                                        Page 2
  159.  
  160.  
  161.  
  162.                                    EXECUTIVE MENU
  163.                                     Version 1.00
  164.                                          by
  165.                                    Leroy B. Inman  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.      The concept  used by  ExecMenu is the facility provided by DOS, called
  172. batch files.  A batch file contains a list of DOS commands that you wish to
  173. be executed  by entering one command. A good example of a batch file is the
  174. AUTOEXEC.BAT. This  batch file  is executed  automatically by  DOS at  boot
  175. time. It  should contain  commands desired  or needed  to  initialize  your
  176. system. Examples might be to set up a RAM disk or setting the time for your
  177. time card.
  178.  
  179.      ExecMenu builds a batch file containing the commands required to carry
  180. out the  menu option  selected. This  requires the  use of  the batch  file
  181. called AUTO.BAT.  AUTO.BAT contains  two commands;  the first  is ExecMenu,
  182. which executes  the menu  program, and the second is TEMP, which is a batch
  183. file containing  commands written  to it  by ExecMenu. After selecting your
  184. desired option  from the  menu, ExecMenu  creates TEMP.BAT which in turn is
  185. executed by  AUTO.BAT. The  TEMP.BAT batch  file will  contain the commands
  186. required to execute the selected option. If you wish to return to ExecMenu,
  187. the last statement in the defined batch file must be a call to ExecMenu.
  188.  
  189.  
  190. HOW TO USE ExecMenu
  191.  
  192.      The best  way to  learn how  to use ExecMenu is to experiment with it.
  193. There are  examples listed  here in the documentation and examples included
  194. with the package.
  195.  
  196.  
  197. Setting up ExecMenu for the first time
  198.  
  199.      A text  editor such  as EDLIN,  WordStar or  the Turbo  Editor, and  a
  200. knowledge of DOS are required to initially set ExecMenu up. Thereafter, its
  201. use consists of simply selecting options from the menu. Start by formatting
  202. a new  diskette and  loading the  diskette with  the Disk Operating System.
  203. Copy the  three files  listed below onto the diskette. To gain some idea of
  204. what automenu looks like, execute the batch file AUTO and select the option
  205. 'Disk Directory'.
  206.  
  207.                     AUTO.BAT
  208.                     ExecMenu.COM
  209.                     ExecMenu.DEF
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.                                        Page 3
  223.  
  224.  
  225.  
  226.                                    EXECUTIVE MENU
  227.                                     Version 1.00
  228.                                          by
  229.                                    Leroy B. Inman  
  230.  
  231.  
  232.  
  233.  
  234.  
  235. ExecMenu Menu Definition File (MDF)
  236.  
  237.      The  default   Menu  Definition   File  used  by  ExecMenu  is  called
  238. ExecMenu.DEF which contains all the information needed by ExecMenu to build
  239. the menu.  Before starting,  determine what  you plan  to title your menus,
  240. what menu  options you  wish to  have, and  the DOS  commands  required  to
  241. execute those  options. This  information can  then be used to build a Menu
  242. Definition File. Below is a sample.
  243.  
  244.                     %TITLE OF MENU ONE
  245.                     .THIS IS A COMMENT LINE
  246.                     .TO PLACE HELPFUL INFO
  247.                     .*OPTION ONE OF MENU ONE
  248.                     ?OPTION HELP
  249.                     ^OPTION PASSWORD
  250.                     *OPTION TWO OF MENU ONE
  251.                     +DOS COMMAND
  252.                     +DOS COMMAND
  253.                     %TITLE OF MENU TWO
  254.                     *OPTION ONE OF MENU TWO
  255.                     +DOS COMMAND
  256.                     *OPTION TWO OF MENU TWO
  257.                     +DOS COMMAND
  258.                     +DOS COMMAND
  259.  
  260.      The software determines the difference of the items listed in the Menu
  261. Definition File  by  the  first  character  in  each  line.  These  special
  262. characters are listed below (See Reference Section for more information):
  263.  
  264.  
  265. Character           Name                Function Performed
  266.  
  267.       %             percent sign             title
  268.  
  269.       *             asterisk                 option
  270.  
  271.       ?             question mark            option help
  272.  
  273.       ^             circumflex               password
  274.  
  275.       +             plus sign                batch dos command
  276.  
  277.       .             period                   comment
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.                                        Page 4
  287.  
  288.  
  289.  
  290.                                    EXECUTIVE MENU
  291.                                     Version 1.00
  292.                                          by
  293.                                    Leroy B. Inman  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.      The maximum  length for each line of information is 40 characters. The
  300. maximum number  of menus that can be defined by one menu definition file is
  301. eight, with  a maximum number of eight options per menu. The maximum number
  302. of batch  commands for each option is ten. Use the example on the disk as a
  303. guide to setting up the MENU.DEF file.
  304.  
  305.  
  306. How to run ExecMenu
  307.  
  308.      Execute the  batch file  AUTO. This  batch file  will execute MENU and
  309. then allow the execution of a batch file built by MENU.
  310.  
  311.  
  312. Functional Characteristics
  313.  
  314.      The menu  options or  menu items  can be selected in various ways. The
  315. particular menu  option with  the arrow  pointing to  it can be selected by
  316. pressing the  return key.  The arrow  pointer can  be moved to another menu
  317. option by  using the  up and  down arrow  keys. A  menu option  can also be
  318. selected by pressing the number value or FUNCTION KEY corresponding to that
  319. menu option. If more than one menu has been defined, the user can change to
  320. the other  menus by  pressing F10  or the  right arrow key to go forward on
  321. menu and F9 or the left arrow key to go backwards one menu.
  322.  
  323.      While the user is at the menu, various fields of information are being
  324. displayed. The  menu selected  tells the  user how many menus are available
  325. and which  particular one is being displayed. The option help field is also
  326. displayed at  the bottom  of the  menu above  the status  block. This field
  327. displays additional  information about  the current option being pointed to
  328. by the  pointer, but  only if the field has been defined by the option. The
  329. time and date are also displayed in the status block.
  330.  
  331.  
  332. Uses and Performance for Floppy Diskette Systems
  333.  
  334.      For a  floppy based  system, placing  the ExecMenu  files on  a  newly
  335. formatted diskette  will enhance  ExecMenu's performance.  The use of a RAM
  336. drive and  the copying  of ExecMenu  and the  batch files to the drive will
  337. also help.  The Customization  section can also help to change the location
  338. of where the temporary batch file is written. For example, the RAM Drive.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.                                        Page 5
  351.  
  352.  
  353.  
  354.                                    EXECUTIVE MENU
  355.                                     Version 1.00
  356.                                          by
  357.                                    Leroy B. Inman  
  358.  
  359.  
  360.  
  361.  
  362.  
  363. REFERENCE SECTION
  364.  
  365.  
  366. Example of ExecMenu Menu Definition File
  367.  
  368.            ..................................
  369.            ..................................
  370.            %******* MS DOS Options *******
  371.            ..................................
  372.            *Directory of Drive A:
  373.            ?Will display all files of drive A:
  374.            +echo Use PrtSc to print.
  375.            +pause
  376.            +DIR A:/P
  377.            +pause
  378.            +c:auto
  379.            ..................................
  380.            *Directory of Drive B:
  381.            ?Will display all files of drive B:
  382.            +echo Use PrtSc to print.
  383.            +pause
  384.            +DIR B:/P
  385.            +pause
  386.            +c:auto
  387.            ..................................
  388.            *Format a data diskette
  389.            ?Format disk in Drive B:
  390.            ^DOS
  391.            +C:FORMAT B:/v
  392.            +c:auto
  393.            ..................................
  394.            *Format a system diskette
  395.            ?Format disk in Drive B:
  396.            ^DOS
  397.            +C:FORMAT B:/s/v
  398.            +c:auto
  399.            ..................................
  400.            ..................................
  401.  
  402.      In the  above example  the batch  files, the  FORMAT command,  and the
  403. ExecMenu program  have been  placed in  the RAM Drive 'C:'. This allows the
  404. continued operation  of ExecMenu  without the need to reinstall the program
  405. disk and  allows a much faster load time when the program is run again from
  406. the batch file.
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.                                        Page 6
  415.  
  416.  
  417.  
  418.                                    EXECUTIVE MENU
  419.                                     Version 1.00
  420.                                          by
  421.                                    Leroy B. Inman  
  422.  
  423.  
  424.  
  425.  
  426.  
  427. Example of AUTOEXEC.BAT
  428.  
  429.  echo off                          <- don't display commands that follow
  430.  prompt $p$g                       <- set up a directory prompt
  431.  cls
  432.  echo Stand-by. Copying some files ....
  433.  copy auto.bat c:/v > nul
  434.  copy execmenu.com c:/v > nul      <- copy some files that will
  435.  copy execmenu.def c:/v > nul      <- be used by the execmenu
  436.  copy format.com c:/v > nul        <- program
  437.  copy more.com c:/v > nul
  438.  c:auto                            <- execute the AUTO.BAT file
  439.  
  440.  
  441. Example of AUTO.BAT
  442.  
  443.  echo off                     <- don't display commands that follow
  444.  execmenu                     <- execute the execmenu program
  445.  if errorlevel 1 goto quit    <- check for error during execmenu
  446.  temp                         <- no error, execute temp.bat
  447.  :quit                        <- label for error goto statement
  448.  echo on                      <- display commands that follow
  449.  
  450. Example of Configuration File
  451.  
  452.  buffers = 10                      <- sets buffers to ten
  453.  device = vdisk.sys size 80        <- sets up a ram drive
  454.  device = mouse.sys                <- loads mouse device driver
  455.  
  456.  
  457. Menu Definition File Functions
  458.  
  459.      This section  describes the  various functions  that can be defined in
  460. the Menu  Definition File  (MDF). The  MDF is  a standard text file that is
  461. read by  ExecMenu to obtain the information needed to display the menu. The
  462. file consists of lines of information ending with a carriage return and the
  463. line feed  characters. The  first character  of each line is used to define
  464. the function of that line to ExecMenu. The end of a MDF is indicated by the
  465. end of  the text  file. Below  is a  list of  the  valid  functions  and  a
  466. description of each.
  467.  
  468.  
  469. ( % ) - Title
  470.  
  471.      Title -  a title  must be defined for each individual menu. This title
  472. will be  displayed on  the second  line on the menu. The title will also be
  473. centered automatically.  In each  MDF the  user can define eight individual
  474. menus in this file.
  475.  
  476.  
  477.  
  478.                                        Page 7
  479.  
  480.  
  481.  
  482.                                    EXECUTIVE MENU
  483.                                     Version 1.00
  484.                                          by
  485.                                    Leroy B. Inman  
  486.  
  487.  
  488.  
  489.  
  490.  
  491. ( * ) - Option
  492.  
  493.      Option -  this is  the actual  item displayed  for the  user to choose
  494. from. There  is a  limit of  eight different  options to  each of the eight
  495. individual menus in the file.
  496.  
  497.  
  498. ( ? ) - Option Help
  499.  
  500.      Option help  - will  cause the  text that follows to be displayed as a
  501. description for  the option that the arrow pointer is pointing to. The text
  502. is centered  automatically and  printed on a line above the status block at
  503. the bottom of the menu.
  504.  
  505.  
  506. ( ^ ) - Password
  507.  
  508.      Password -  the text  that follows  this function  will be used as the
  509. password required  by the  user to  gain access  to that option selected. A
  510. maximum of  30 characters  is allowed  for the  password. The example below
  511. would require  the user  to enter the password "DOS". The password checking
  512. routine does  not try to determine any differences between  UPPER and lower
  513. case letters.
  514.  
  515.      EXAMPLE: *Return to Disk Operating System
  516.      ^DOS
  517.  
  518.  
  519. ( + ) - Batch DOS Commands
  520.  
  521.      Batch DOS  Commands -  This function  defines  a  DOS  command  to  be
  522. executed in  a DOS  batch file.  There is  a limit  of ten  lines per batch
  523. file, which can be changed from within the source code file. ExecMenu  will
  524. create a  batch file containing the lines marked with this  function. After
  525. the batch  file is  written, ExecMenu  will return  to the  Disk  Operating
  526. System. Once ExecMenu has terminated the remaining  command, "TEMP" will be
  527. executed. TEMP is the name of the batch file containing commands written to
  528. it by  ExecMenu. It  is important  that the   last command be AUTO, so that
  529. ExecMenu regains control. If not, the  user will be returned to DOS.
  530.  
  531.  
  532. ( . ) - Comments
  533.  
  534.      Comment - this function is used to place a comment inside the MDF.
  535. ExecMenu simply ignores this line all together. Anything can be placed on
  536. this line.
  537.  
  538.  
  539.  
  540.  
  541.  
  542.                                        Page 8
  543.  
  544.