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

  1. @echo off
  2. :: *** dBAT Menu Demo #1 ***    :: Turn off the echo (use @ if DOS3.3 or +)
  3. :: ~~~~~~~~~~~~~~~~~~~~~~~~~
  4. :: Note: This example uses ASK.EXE to get key pressed and set DOS errorlevel.
  5. ::       A major advantage of this type of menu system is that TSRs such
  6. ::       as EMULATION programs can be loaded from the menu.
  7. :START
  8. ::c:
  9. ::cd \
  10. :: Note: If running this batch file from another directory, you must either: 
  11. ::       1. pass the batch file's full path to dBAT, or
  12. ::       2. change (in the batch file) to the directory that contains the
  13. ::          batch file before the line that runs dBAT
  14. ::          (because dBAT doesn't search the PATH for the batch file to read it)
  15. dBAT %0
  16. goto ENDdBAT
  17.  
  18. PROC dBAT
  19. SET COLOR TO 112            && Black on White
  20. @ 00,00 CLEAR TO 00,79      && clear top row
  21. @ 24,00 CLEAR TO 24,79      && clear top row
  22. @ 24,01 ?? "Select Option -or- Press Esc to exit Menu to DOS"
  23. SET COLOR TO 15             && Bright White on Black
  24. @ 00,30 ?? " Company - Main Menu "
  25. SET COLOR TO 31             && Bright white on blue (for color#s COLOR.COM)
  26. @ 01,00 TO 23,79 DOUBLE     && border double line box
  27. @ 02,01 CLEAR TO 22,78      && clear the box space
  28. SET COLOR TO 30
  29. @ 06,28 ?? "A...General Ledger"
  30. @ 07,28 ?? "B...Payroll"
  31. SET COLOR TO 29
  32. @ 09,28 ?? "C...Lotus 123"
  33. @ 10,28 ?? "D...Professional Write"
  34. SET COLOR TO 27
  35. @ 12,28 ?? "E...S/36 & PC Support Menu"
  36. SET COLOR TO 26
  37. @ 14,28 ?? "P...Park"
  38. SET COLOR TO
  39. @ 21,00
  40. *** use following line for centering item on the screen...
  41. *@ 02,00 ?? "012345678901234567890123456789012345678--876543210987654321098765432109876543210"
  42. QUIT
  43. :ENDdBAT
  44.  
  45. :RETRY
  46. ASK/efq "" abcdefghijklmnopqrstuvwxyz123456789\27
  47. if errorlevel 36 goto EXIT        Rem Esc
  48. if errorlevel 35 goto retry       Rem 9
  49. if errorlevel 34 goto retry       Rem 8
  50. if errorlevel 33 goto retry       Rem 7
  51. if errorlevel 32 goto retry       Rem 6
  52. if errorlevel 31 goto retry       Rem 5
  53. if errorlevel 30 goto retry       Rem 4
  54. if errorlevel 29 goto retry       Rem 3
  55. if errorlevel 28 goto retry       Rem 2
  56. if errorlevel 27 goto retry       Rem 1
  57. if errorlevel 26 goto retry       Rem Z
  58. if errorlevel 25 goto retry       Rem Y
  59. if errorlevel 24 goto retry       Rem X
  60. if errorlevel 23 goto retry       Rem W
  61. if errorlevel 22 goto retry       Rem V
  62. if errorlevel 21 goto retry       Rem U
  63. if errorlevel 20 goto retry       Rem T
  64. if errorlevel 19 goto retry       Rem S
  65. if errorlevel 18 goto retry       Rem R
  66. if errorlevel 17 goto retry       Rem Q
  67. if errorlevel 16 goto PARK        Rem P
  68. if errorlevel 15 goto retry       Rem O
  69. if errorlevel 14 goto retry       Rem N
  70. if errorlevel 13 goto retry       Rem M
  71. if errorlevel 12 goto retry       Rem L
  72. if errorlevel 11 goto retry       Rem K
  73. if errorlevel 10 goto retry       Rem J
  74. if errorlevel  9 goto retry       Rem I
  75. if errorlevel  9 goto retry       Rem H
  76. if errorlevel  7 goto retry       Rem G
  77. if errorlevel  6 goto retry       Rem F
  78. if errorlevel  5 goto PCS         Rem E
  79. if errorlevel  4 goto PW          Rem D
  80. if errorlevel  3 goto LOTUS       Rem C
  81. if errorlevel  2 goto PR          Rem B
  82. if errorlevel  1 goto GL          Rem A
  83. if errorlevel  0 goto retry
  84. goto EXIT
  85.  
  86. :GL
  87. :: c:
  88. :: cd \gl
  89. :: GL...
  90. echo !!! You selected General Ledger !!!
  91. pause
  92. :: cd \
  93. goto START
  94.  
  95. :PR
  96. :: c:
  97. :: cd \PR
  98. :: PR...
  99. echo !!! You selected Payroll !!!
  100. pause
  101. :: cd \
  102. goto START
  103.  
  104. :LOTUS
  105. :: c:
  106. echo !!! You selected Lotus 123 !!!
  107. pause
  108. :: cd \123
  109. :: 123
  110. :: cd \
  111. goto START
  112.  
  113. :PW
  114. :: c:
  115. :: cd \PW
  116. :: PW
  117. echo !!! You selected Professional Write !!!
  118. pause
  119. :: cd \
  120. goto START
  121.  
  122. :PCS
  123. :: c:
  124. :: cd \PCS
  125. :: Note: only a batch file menu system can load a TSR from the menu
  126. :: Note: must use CALL when running a batch file to return control to here
  127. :: call LINK36
  128. echo !!! You selected PC Support !!!
  129. pause
  130. :: cd \
  131. goto START
  132.  
  133. :PARK
  134. cls
  135. PARK
  136. goto END
  137.  
  138. :EXIT
  139. cls
  140. :END
  141.