home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / C / BATQUEST.ZIP / MENU.BAT < prev    next >
Encoding:
DOS Batch File  |  1987-11-09  |  1.8 KB  |  93 lines

  1. echo off
  2. :
  3. : This should give you a template to create your own menu system from.
  4. :
  5. : two handy batch file tips.  1. a colon and a space makes for a time-saving
  6. : comment.  1. ECHO followed by two spaces and a backspace character (ascii 8)
  7. : will echo a blank line.  the problem is finding a word processor that lets
  8. : you enter a backspace this way (usually using the alt key and the 8 key on 
  9. : the numeric keypad).  a backspace looks like this 
  10. :
  11.  
  12. :menu_again
  13.  
  14. cls
  15. ECHO  
  16. ECHO  
  17. ECHO                    -------------[  My Menu  ]------------- 
  18. ECHO  
  19. ECHO  
  20. ECHO                                  L)otus 1-2-3
  21. ECHO  
  22. ECHO                                  W)ordperfect
  23. ECHO  
  24. ECHO                                  d)BASE III+ 
  25. ECHO  
  26. ECHO                                    P)rocomm  
  27. ECHO  
  28. ECHO                                   S)ub-menu
  29. ECHO  
  30. ECHO                                    R)un DOS  
  31. ECHO  
  32. ECHO                                     Q)uit    
  33. ECHO  
  34. ECHO  
  35. ECHO  
  36.  
  37. BATQUEST "Your choice : " LWDPSRQ
  38. ECHO  
  39. ECHO  
  40.  
  41. IF ERRORLEVEL 7 GOTO QUIT
  42. IF ERRORLEVEL 6 GOTO RUNDOS
  43. IF ERRORLEVEL 5 GOTO SUBMENU
  44. IF ERRORLEVEL 4 GOTO PROCOMM
  45. IF ERRORLEVEL 3 GOTO DBASE
  46. IF ERRORLEVEL 2 GOTO WP
  47. IF ERRORLEVEL 1 GOTO 123
  48.  
  49. goto menu_again
  50.  
  51. :----------------------------
  52. :rundos
  53. cls
  54. echo Type EXIT to return to the menu
  55. COMMAND
  56. goto menu_again
  57.  
  58. :----------------------------
  59. :wp
  60. cd \wp
  61. wp
  62. goto menu_again
  63.  
  64. :----------------------------
  65. :dbase
  66. cd \dbase
  67. dbase
  68. goto menu_again
  69.  
  70. :----------------------------
  71. :submenu
  72. command /c submenu
  73. goto menu_again
  74.  
  75. :----------------------------
  76. :procomm
  77. cd \procomm
  78. procomm
  79. goto menu_again
  80.  
  81. :----------------------------
  82. :123
  83. cd \123
  84. 123
  85. goto menu_again
  86.  
  87. :----------------------------
  88. :quit
  89. echo 
  90. Echo Type MENU to restart the menu
  91. echo 
  92.  
  93.