Thank you for reviewing this, Bob. My computer is set up to run 24/7 so it
is not configured to go into standby mode.
Incidentally this is Turbo V-8 Build: 8.0.21.30515 running under Windows XP
Pro SP3.
I'm basically using the COUNTDOWN form as a graphic substitute for a PAUSE
FOR n command so that there is some visual feedback to let me know how long
it will be until the program continues. It's a progress indicator more or
less.
The form is called from my EMAILER.RMD command file which is itself called
from other programs using RUN EMAILER.RMD USING .var1, .var2, .var3, .var4
EMAILER.RMD checks for the following condition: IF (CVAL('Database')) <>
'ZANEDATA' AND #TIME BETWEEN '06:00:00' AND '06:10:00' THEN
If the condition is met some variables are initialized:
SET VAR VCRNT_TIME TIME = .#TIME
SET VAR VTRGT_TIME TIME = (RTIME(6,10,0))
SET VAR VSECS INTEGER = (.VTRGT_TIME - .VCRNT_TIME)
SET VAR VDISPLAY INTEGER = .VSECS
and then the form is opened:
EDIT USING COUNTDOWN
The COUNTDOWN form displays the digital clock and a variable edit
(VDISPLAY). VDISPLAY shows the number of seconds from #TIME until 6:10 AM.
It is set to 1000 milliseconds for 1 second refreshes.
The timer EEP in the form uses a WHILE loop to determine when it's time to
move on:
WHILE #TIME < .VTRGT_TIME THEN
SET VAR VSECS INTEGER = (.VTRGT_TIME - .#TIME)
SET VAR VDISPLAY INTEGER = .VSECS
RECALC VARIABLES
SKIP TO VDISPLAY
ENDWHILE
CLOSEWINDOW
RETURN
Once it gets to 6:10 AM the IF-ENDIF block is terminated and away we go.
CLEAR VAR V%TIME, VSECS, VDISPLAY, VDB
ENDIF
The one thing I'm not sure about is whether the CLOSEWINDOW command is
necessary or if it should be used elsewhere.
It seems pretty straightforward but why the screen saver seems to interfere
with it eludes my understanding at this moment.
Thanks again for any suggestions. -- Mike
_____
Looking at your code however, it looks like you may not be using the timer
function as intended. Is the code you have marked as " runs the form"
actually
in the form timer EEP or is this in a command file you are calling at start
up?
>From your code, I am not seeing how you are using the timer function. If
you
can further elaborate, we might be of further assistance.
-Bob
Confidentiality Notice
This message is intended exclusively for the individual or entity to which it
is
addressed and may contain privileged, proprietary, or otherwise private
information.
If you are not the named addressee, you are not authorized to read, print,
retain,
copy or disseminate this message or any part of it. If you have received this
message in error, please notify the sender immediately by e-mail and delete all
copies of the message.