home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
progm
/
xbatch.zip
/
DD3.BAT
< prev
next >
Wrap
DOS Batch File
|
1988-09-14
|
3KB
|
76 lines
BOX from 4 10 to 20 70 colors %1 %2 single
DISPLAY "The GETCHAR command always sets the ERRORLEVEL variable to the ASCII value." line 22 center clear
DISPLAY "Example: GETCHAR at 17 20 choices \"abc\" " line 24 colors %4 %5 clear
DISPLAY "Press the A, B, or C key." line 12 center color %3 bright
GETCHAR choices "abc" at 17 20
if errorlevel == 67 goto e67
if errorlevel == 66 goto e66
if errorlevel == 65 goto e65
:e67
echo C returns ERRORLEVEL 67
goto next1
:e66
echo B returns ERRORLEVEL 66
goto next1
:e65
echo A returns ERRORLEVEL 65
goto next1
:next1
DISPLAY " Press any key. " line 12 center color %3
GETCHAR noecho
BOX from 4 10 to 20 70 colors %4 %5 double noclear
BOX from 5 11 to 19 69 colors 7 0
SHOW date at 14 20 colors %2 %1
SHOW time at 14 38 colors %2 %1
SHOW day at 14 54 colors %2 %1
DISPLAY "The SHOW command displays the date, time or day of week." line 22 center clear
DISPLAY "Example: SHOW date at 12 30 colors 1 7" line 24 colors %4 %5 clear
DISPLAY "Press any key." colors %3 %2 line 12 center
GETCHAR noecho
DISPFILE screens.dat from 4 10 to 20 70 colors %1 %2 double screen 2
DISPLAY "The DISPFILE command reads text from a file and displays it in a box." line 22 center clear
DISPLAY "Example: DISPFILE screens.dat from 4 10 to 20 70 colors 7 1" line 24 colors %4 %5 clear
GETCHAR noecho
BOX from 4 10 to 20 70 colors %1 %2 single
DISPLAY "The WAIT command lets you delay for a specific number of seconds." line 22 center clear
DISPLAY "Example: WAIT for 10" line 24 colors %4 %5 clear
DISPLAY "Wait - next screen will be displayed in 10 seconds." colors %3 %2 blink line 12 center
WAIT for 10
BOX from 4 10 to 20 70 colors %1 %2 single
DISPLAY "The WAIT command lets you delay until a specific time of day." line 22 center clear
DISPLAY "Example: WAIT until 12:00" line 24 colors %4 %5 clear
DISPLAY "Wait - simulated wait until 12:00." line 12 center colors %3 %2 blink
DISPLAY "11:56" at 6 60
WAIT for 1
DISPLAY "11:57" at 6 60
WAIT for 1
DISPLAY "11:58" at 6 60
WAIT for 1
DISPLAY "11:59" at 6 60
WAIT for 1
DISPLAY "12:00" at 6 60
WAIT for 1
DISPLAY "12:00" at 6 60
DISPLAY " Press any key. " line 12 center colors %3 %2
GETCHAR noecho
BOX from 4 10 to 20 70 colors %1 %2 single
DISPLAY "The WAIT command can also pause until the user presses any key." line 22 center clear
DISPLAY "Example: WAIT anykey" line 24 colors %4 %5 clear
DISPLAY "Press any key." colors %3 %2 line 12 center
WAIT anykey
BOX from 4 10 to 20 70 colors %1 %2 single
DISPLAY "The SOUND command beeps at a specific frequency and duration." line 22 center clear
DISPLAY "Example: SOUND freq 800 for 4" line 24 colors %4 %5 clear
DISPLAY "Wait - making a 800 hz beep for 4 seconds." colors %3 %2 blink line 12 center
SOUND freq 800 for 4
DISPLAY " Press any key. " colors %3 %2 line 12 center
getchar noecho
dd4 %1 %2 %3 %4 %5