home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / USCX / DOSUT-17.ZIP / INP.BAT < prev    next >
DOS Batch File  |  1980-01-01  |  1KB  |  54 lines

  1.  
  2.  
  3. ECHO OFF
  4. .This demonstrates the INPUT program
  5. .Use the ECHO statements to create a menu, then branch on the keyin
  6. CLS
  7. ECHO To do the first thing type      A
  8. ECHO To do the second thing type     B
  9. ECHO To do the third thing type      3
  10. ECHO To do the fourth thing type     D
  11. ECHO To do the fifth thing type      E
  12. ECHO .
  13. .Notice that the input can be any printable key (but forced to upper case)
  14. INPUT "AB3DE"
  15. ECHO .
  16. .Note that the IF ERRORLEVEL checks for error or HIGHER,so you must test
  17. .in reverse order (high first)
  18. .ESC always returns a 255 value
  19. IF ERRORLEVEL 255 GOTO ESC
  20. IF ERRORLEVEL 5 GOTO FIVE
  21. IF ERRORLEVEL 4 GOTO FOUR
  22. IF ERRORLEVEL 3 GOTO THREE
  23. IF ERRORLEVEL 2 GOTO TWO
  24. IF ERRORLEVEL 1 GOTO ONE
  25. :ESC
  26. ECHO You pressed the ESC key
  27. GOTO STOP
  28. :ONE
  29. ECHO You pressed the A key
  30. .User can run a program here
  31. GOTO STOP
  32. :TWO
  33. ECHO You pressed the B key
  34. .User can run a program here
  35. GOTO STOP
  36. :THREE
  37. ECHO You pressed the 3 key
  38. .User can run a program here
  39. GOTO STOP
  40. :FOUR
  41. ECHO You pressed the D key
  42. .User can run a program here
  43. GOTO STOP
  44. :FIVE
  45. ECHO You pressed the E key
  46. .User can run a program here
  47. GOTO STOP
  48. :STOP
  49. .Then start another batch file with a different menu
  50. 
  51.  
  52. ed the E key
  53. .User can run a program here
  54. GOT