home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / progm / xbatch.zip / DD3.BAT < prev    next >
DOS Batch File  |  1988-09-14  |  3KB  |  76 lines

  1. BOX from 4 10 to 20 70 colors %1 %2 single
  2. DISPLAY "The GETCHAR command always sets the ERRORLEVEL variable to the ASCII value." line 22 center clear
  3. DISPLAY "Example:  GETCHAR at 17 20 choices \"abc\" " line 24 colors %4 %5 clear
  4. DISPLAY "Press the A, B, or C key." line 12 center color %3 bright
  5. GETCHAR choices "abc" at 17 20
  6.   if errorlevel == 67 goto e67
  7.   if errorlevel == 66 goto e66
  8.   if errorlevel == 65 goto e65
  9. :e67
  10.   echo C returns ERRORLEVEL 67
  11.   goto next1
  12. :e66
  13.   echo B returns ERRORLEVEL 66
  14.   goto next1
  15. :e65
  16.   echo A returns ERRORLEVEL 65
  17.   goto next1
  18. :next1
  19. DISPLAY "     Press any key.      " line 12 center color %3
  20. GETCHAR noecho
  21.  
  22. BOX from 4 10 to 20 70 colors %4 %5 double noclear
  23. BOX from 5 11 to 19 69 colors 7 0
  24. SHOW date at 14 20 colors %2 %1
  25. SHOW time at 14 38 colors %2 %1
  26. SHOW day  at 14 54 colors %2 %1
  27. DISPLAY "The SHOW command displays the date, time or day of week." line 22 center clear
  28. DISPLAY "Example:  SHOW date at 12 30 colors 1 7" line 24 colors %4 %5 clear
  29. DISPLAY "Press any key." colors %3 %2 line 12 center
  30. GETCHAR noecho
  31.  
  32. DISPFILE screens.dat from 4 10 to 20 70 colors %1 %2 double screen 2
  33. DISPLAY "The DISPFILE command reads text from a file and displays it in a box." line 22 center clear
  34. DISPLAY "Example:  DISPFILE screens.dat from 4 10 to 20 70 colors 7 1" line 24 colors %4 %5 clear
  35. GETCHAR noecho
  36.  
  37. BOX from 4 10 to 20 70 colors %1 %2 single
  38. DISPLAY "The WAIT command lets you delay for a specific number of seconds." line 22 center clear
  39. DISPLAY "Example:  WAIT for 10" line 24 colors %4 %5 clear
  40. DISPLAY "Wait - next screen will be displayed in 10 seconds." colors %3 %2 blink line 12 center
  41. WAIT for 10
  42.  
  43. BOX from 4 10 to 20 70 colors %1 %2 single
  44. DISPLAY "The WAIT command lets you delay until a specific time of day." line 22 center clear
  45. DISPLAY "Example:  WAIT until 12:00" line 24 colors %4 %5 clear
  46. DISPLAY "Wait - simulated wait until 12:00." line 12 center colors %3 %2 blink
  47. DISPLAY "11:56" at 6 60
  48. WAIT for 1
  49. DISPLAY "11:57" at 6 60
  50. WAIT for 1
  51. DISPLAY "11:58" at 6 60
  52. WAIT for 1
  53. DISPLAY "11:59" at 6 60
  54. WAIT for 1
  55. DISPLAY "12:00" at 6 60
  56. WAIT for 1
  57. DISPLAY "12:00" at 6 60
  58. DISPLAY "          Press any key.          " line 12 center colors %3 %2
  59. GETCHAR noecho
  60.  
  61. BOX from 4 10 to 20 70 colors %1 %2 single
  62. DISPLAY "The WAIT command can also pause until the user presses any key." line 22 center clear
  63. DISPLAY "Example:  WAIT anykey" line 24 colors %4 %5 clear
  64. DISPLAY "Press any key." colors %3 %2 line 12 center
  65. WAIT anykey
  66.  
  67. BOX from 4 10 to 20 70 colors %1 %2 single
  68. DISPLAY "The SOUND command beeps at a specific frequency and duration." line 22 center clear
  69. DISPLAY "Example:  SOUND freq 800 for 4" line 24 colors %4 %5 clear
  70. DISPLAY "Wait - making a 800 hz beep for 4 seconds." colors %3 %2 blink line 12 center
  71. SOUND freq 800 for 4
  72. DISPLAY "              Press any key.                " colors %3 %2 line 12 center
  73. getchar noecho
  74.  
  75. dd4 %1 %2 %3 %4 %5
  76.