On timer question 
Author Message
 On timer question

I have a program I need to run at an interval, say every minute. I
know the on timer command should do this but I haven't been able to
make if work successfully. Can anyone give me an example that would
work?  Also, I am trying to find out how the day of the week is
accesed in QuickBasic.


Thu, 04 Dec 1997 03:00:00 GMT  
 On timer question

Quote:

>I have a program I need to run at an interval, say every minute. I
>know the on timer command should do this but I haven't been able to
>make if work successfully. Can anyone give me an example that would
>work?  Also, I am trying to find out how the day of the week is
>accesed in QuickBasic.

If you want the same program to repeat itself at intervals, the SLEEP ( )
keyword is what I would use. The number in the parentheses has to be
whole numbers - not fractions or decimals. The number is the number
of seconds the program will sleep before continuing.

AA:
cls

XXXXXXX
XXXXXXX
XXXXXX
XXXXXXX

SLEEP (5)

GOTO AA:

This program would repeat itself every five seconds.

Terry



Thu, 04 Dec 1997 03:00:00 GMT  
 On timer question

Quote:

>I have a program I need to run at an interval, say every minute. I
>know the on timer command should do this but I haven't been able to
>make if work successfully. Can anyone give me an example that would
>work?  Also, I am trying to find out how the day of the week is
>accesed in QuickBasic.

I am using the following in a program that's still
in the works (Don't remember if I worked it out or
if someone gave it to me)

FOR TRIP = 1 TO whatever
        WaitPeriod! = TIMER
        GoofOff! = WaitPeriod! + 10     (seconds)
             (or whatever figure you want)
        WHILE GoofOff! <> TIMER: WEND
        HERE, you do something important
NEXT TRIP

As to accessing the Day O'The Week, I'm using PDS7.1
so the included - Date,Time,Format - DTFMTxx.LIB
and it's QuickLib do all the hard work for me (converts
back and forth from a date serial number), so if
you're working in one of the other Basic Versions,
without these LIBs, I can't help with this...sorry.

Anyway, good luck,
Later...Don T.

--
x_____x_____x_____x_____x_____x_____x_____x_____x

  Vegas Knight's Software <IN-ovation IN-ferno>



Thu, 11 Dec 1997 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Timer question

2. Newbie Timer Question

3. timer question

4. Timer(s) Question

5. Timer Question - I have explained better what I am looking for

6. Timer Question

7. Timer question

8. Timer Question

9. quick TIMER question

10. Timer Question

11. VB5 timer question

12. VB5 Oncomm-Timer Question

 

 
Powered by phpBB® Forum Software