home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Animation & Sound / SOS-ANIM_SOUND.ISO / best_50 / icndos17.zip / RUN.DOC < prev    next >
Text File  |  1993-11-11  |  4KB  |  87 lines

  1.                                 RUN.DOC
  2.  
  3. IconDOS is basically a graphical front-end to a batch file, RUN.BAT. The
  4. batch file does all of the real work of actually running a DOS command
  5. set corresponding to the selected icon and returning control back to the
  6. IconDOS menu front-end once it is finished.  RUN.BAT is composed of 3
  7. general sections:
  8.  
  9. 1) Command Dispatcher - Sends execution to a label matching the first
  10.                         parameter passed to the batch file.
  11.  
  12. 2) Command Sets - A set of DOS commands for each icon.  Each command set
  13.                   starts with a unique label and ends with a "goto"
  14.                   statement which sends control to the cleanup section.
  15.  
  16. 3) Cleanup - Returns to the IconDOS directory, reloads Icondos and
  17.              re-displays the correct menu.
  18.  
  19. More specifically, RUN.BAT is similiar to the following:
  20.  
  21.  
  22. Batch Command │ Comments
  23. ──────────────┼──────────────────────────────────────────────────────────
  24. @echo off     │<-- Turns echo off so the following commands don't display
  25. goto %1       │<-- sends control to the label matching the first parameter
  26.               │    passed to RUN.BAT by the icon command string.
  27.               │
  28. :label1       │<-- Unique label identifying this command set.
  29. (DOS commands)│<-- User supplied DOS commands for command string: RUN LABEL1.
  30. goto done     │<-- Sends control to the cleanup area labeled :done below.
  31.               │
  32. :label2       │
  33. (DOS commands)│<-- User supplied DOS commands for cmd string: RUN LABEL2
  34. goto done     │<-- Jump to cleanup area.  This should be the last line in
  35.    .          │    each command set.
  36.    .          │
  37.    .          │<-- (add more labels/command sets as needed here, one per
  38.    .          │    icon)
  39. :labeln       │
  40. (DOS commands)│
  41. goto done     │
  42.               │
  43. :done         │<-- cleanup label
  44. CD\menu       │<-- return to IconDOS directory in case it was changed above
  45. ICONDOS mymenu│<-- return control back to IconDOS and 'mymenu'
  46.  
  47.  
  48. Appropriate command strings must be assigned to the icons in order to
  49. interface with RUN.BAT.  These command strings should be similiar to the
  50. following:
  51.  
  52.  
  53. Icon                Generic Icon Command String           Specific Examples
  54. _______________________________________________________________________________
  55.  
  56. 1                         RUN label1                        RUN WP
  57. 2                         RUN label2                        RUN 123
  58. 3                         RUN label3                        RUN DBASE
  59. .                              .                               .
  60. .                              .                               .
  61. .                              .                               .
  62.  
  63. RUN.BAT is initially configured to operate as a demo which simply
  64. displays a message identifying the selected icon where (DOS commands)
  65. are shown above.
  66.  
  67. ALTERNATE SETUP
  68.  
  69. If you feel that the above is too complex for your taste, there is
  70. nothing to prevent you from setting you a single, individual batch file
  71. for each icon.  The name of the batch file would be entered as the
  72. icon's command string.  The last step in the batch file should be to
  73. return control to IconDOS.
  74.  
  75. This alternate approach is perfectly valid but it is more wasteful of
  76. disk space due to the way a hard drive works.  Every disk file is stored
  77. as a chain of clusters.  A cluster is simply a fixed minimum unit of
  78. storage set by the hard drive manufacturer.  Clusters are most often 4K
  79. in size; however, 2K clusters are also used.  Partial clusters are NEVER
  80. allocated; therefore, a batch file that is 400 bytes in size requires 1
  81. full cluster for storage which wastes 3696 bytes out of a 4K cluster.
  82. This may not seem like much but it adds up quickly.  Creating a menu
  83. with only ten icons using this approach would waste 36K of disk space.
  84.  
  85. Using a single batch file containing multiple named command sets, as
  86. described above, is the more efficient, preferred approach.
  87.