home *** CD-ROM | disk | FTP | other *** search
- 'DELAY TIMER PROGRAM
- 'Written by Curtis Harper
- ' LAKELAND RBBS-PC
- ' (502)527-7617
- '6-14-1988
- 'This program will wait 5 seconds and default to system if a key is
- 'not pressed.
-
- 10 CLS 'Clear Screen
- 20 T$ = TIME$ 'Get current time
- S = VAL(MID$(T$, 7, 2)) 'Get current seconds
- S = S + 5 'Add 5 seconds
- IF S > 60 THEN S = S - 60 'Offset for 56 to 59 seconds
- MID$(T$, 6, 3) = STR$(S) 'Create seconds string
- MID$(T$, 6, 1) = ":"
- S = 5 'Set on screen seconds
- I$ = MID$(TIME$, 7, 2) 'Get current time seconds
- 25 LOCATE 4, 15: PRINT "PROGRAM WILL START UNLESS ANY KEY IS PRESSED IN "; S; " SECONDS"
- IF MID$(TIME$, 7, 2) <> I$ THEN 'Check for seconds change
- I$ = MID$(TIME$, 7, 2) 'If different seconds
- S = S - 1
- END IF
- 30 IF MID$(T$, 7, 2) = MID$(TIME$, 7, 2) THEN GOTO 80 'Check for 5 sec timeout
- IF INKEY$ = "" THEN GOTO 25 'Check for key press
- 70 OPEN "TIME.BAT" FOR OUTPUT ACCESS WRITE AS #1 'Create TIME.BAT file
- PRINT #1, "TIME TRIP"
- CLOSE #1
- CLS
- SYSTEM
- 80 CLS 'No key pressed then begone!
- SYSTEM
-
-