BBS: Inland Empire Archive
Date: 11-04-92 (18:04) Number: 316
From: VICTOR YIU Refer#: NONE
To: ZACK JONES Recvd: NO
Subj: Re: WSMaker 2.0 Conf: (2) Quik_Bas
-=> Quoting Zack Jones to Victor Yiu <=-
screen saver routine...
Well, it is nothing major at all -- I even wonder why you ask...
My program is structured (WSMaker) so that whenever the program waits for
a keystroke with INKEY$ (that's all it uses -- it occurs in a total of
about... 10 places), a CALL Clock (X) is also executed within the loop:
I$ = INKEY$
LOOP UNTIL LEN(I$)
SUB Clock (Pressed%)
Clock checks if the time has advanced, and if so, it will write it in the
screen, and check if the time elapsed from the Last keystroke is more than
180 seconds. If so, invoke ScreenSaver (SUB) and reset the counter when
Clock is called with a parameter Pressed -- meaning if a key was just pressed
Here is SUB Clock:
SUB Clock (Pressed%) STATIC
TimeCount& = Timr
IF Pressed = 1 THEN LastKeyPress& = TimeCount&
IF OldTime$ <> TIME$ THEN
OldTime$ = TIME$
Hour = (ASC(TIME$) - 48) * 10 + (ASC(MID$(TIME$, 2)) - 48)
IF Hour > 12 THEN
T$ = MID$(STR$(Hour - 12), 2) + MID$(TIME$, 3) + "pm"
IF Hour = 0 THEN T$ = "12" + MID$(T$, 2)
IF Hour < 10 THEN T$ = Blank$ + T$
IF LEFT$(TIME$, 1) = "0" THEN
T$ = Blank$ + MID$(TIME$, 2)
T$ = TIME$
IF Hour = 0 THEN T$ = "12" + MID$(T$, 3)
IF Hour < 12 THEN T$ = T$ + "am" ELSE T$ = T$ + "pm"
LOCATE 1, 68, 0
COLOR 0, 7
PRINT "³ ";
IF ColorM THEN COLOR 15, 7
IF SSaver THEN
Tim& = TimeCount&
IF ((Tim& - LastKeyPress&) > SSDelay) THEN
LastKeyPress& = Timr
Hope it helps. If you have any questions, just ask. :-)
If you were asking about how to make the ACTUAL screensaver routine...
... That a BlueWave packet in your pocket or are you just glad to see me?
--- Blue Wave/RA v2.10 [NR]
* Origin: Hard Disc Cafe / Houston Texas / (713) 589-2690 / (1:106/30.0)