home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / DATABASE / DBAT110.ZIP / LBAR2.BAT < prev    next >
DOS Batch File  |  1992-01-10  |  3KB  |  112 lines

  1. @echo off
  2. :: *** dBAT Light Bar Menu Demo #2 ***
  3. :: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. :START
  5. ::c:
  6. ::cd \
  7.  
  8. dBAT %0
  9. goto ENDdBAT
  10.  
  11. Note: This dBAT example sets the DOS errorlevel based on the selection.
  12.       A major advantage of this type of menu system is that TSRs such
  13.       as EMULATION programs can be loaded from the menu.
  14.  
  15. Note: If running this batch file from another directory, you must either: 
  16.       1. pass the batch file's full path to dBAT, or
  17.       2. change (in the batch file) to the directory that contains the
  18.          batch file before the line that runs dBAT
  19.          (because dBAT doesn't search the PATH for the batch file to read it)
  20.  
  21. PROC dBAT
  22.  
  23. SET CURSOR OFF
  24. SET COLOR TO 112            && Black on White
  25. @ 00,00 CLEAR TO 00,79      && clear top row
  26. @ 24,00 CLEAR TO 24,79      && clear top row
  27. @ 24,01 ?? "Select Option -or- Press Esc to exit Menu to DOS"
  28. SET COLOR TO 95
  29. @ 00,29 ?? " Company - Main Menu "
  30. SET COLOR TO 31             && Bright white on blue (for color#s COLOR.COM)
  31. @ 01,00 TO 23,79 DOUBLE     && border double line box
  32. @ 02,01 CLEAR TO 22,78      && clear the box space
  33. SET COLOR TO 30
  34. SET ICOLOR TO 95
  35. @ 06,27 PROMPT "A...General Ledger"
  36. @ 07,27 PROMPT "B...Payroll"
  37. @ 09,27 PROMPT "C...Lotus 123"
  38. @ 10,27 PROMPT "D...Professional Write"
  39. @ 12,27 PROMPT "E...S/36 & PC Support Menu"
  40. @ 14,27 PROMPT "P...Park"
  41. MENU TO
  42. QUIT
  43. *** uncomment the following line for centering...
  44. *@ 11,00 ?? "012345678901234567890123456789012345678--876543210987654321098765432109876543210"
  45. :ENDdBAT
  46.  
  47. cls
  48. if errorlevel 7 goto EXIT        Rem Esc
  49. if errorlevel 6 goto PARK        Rem P
  50. if errorlevel 5 goto PCS         Rem E
  51. if errorlevel 4 goto PW          Rem D
  52. if errorlevel 3 goto LOTUS       Rem C
  53. if errorlevel 2 goto PR          Rem B
  54. if errorlevel 1 goto GL          Rem A
  55. goto EXIT
  56.  
  57. :GL
  58. :: c:
  59. :: cd \gl
  60. :: GL...
  61. echo !!! You selected General Ledger !!!
  62. pause
  63. :: cd \
  64. goto START
  65.  
  66. :PR
  67. :: c:
  68. :: cd \PR
  69. :: PR...
  70. echo !!! You selected Payroll !!!
  71. pause
  72. :: cd \
  73. goto START
  74.  
  75. :LOTUS
  76. :: c:
  77. echo !!! You selected Lotus 123 !!!
  78. pause
  79. :: cd \123
  80. :: 123
  81. :: cd \
  82. goto START
  83.  
  84. :PW
  85. :: c:
  86. :: cd \PW
  87. :: PW
  88. echo !!! You selected Professional Write !!!
  89. pause
  90. :: cd \
  91. goto START
  92.  
  93. :PCS
  94. :: c:
  95. :: cd \PCS
  96. :: Note: only a batch file menu system can load a TSR from the menu
  97. :: Note: must use CALL when running a batch file to return control to here
  98. :: call LINK36
  99. echo !!! You selected PC Support !!!
  100. pause
  101. :: cd \
  102. goto START
  103.  
  104. :PARK
  105. cls
  106. PARK
  107. goto END
  108.  
  109. :EXIT
  110. cls
  111. :END
  112.