Dave,
    This will check it at the 5 minute mark.

Sample Format:
  StartTimer 250, "SetFocus", dObj.Control( dID )
Your Format:
  StartTimer 50000, "CheckForState"
Sub CheckForState()
End Sub

Sent: Thursday, January 22, 2015 6:05 AM
Subject: Think I could need a bit of help...


Scripters,
In one of my projects, I need some routine to check a certain state of
things, with given intervals. This should be done in the background,
with as little interference with the user's activity, as possible. Let's
for instance say, you want to check if a file has been updated, and you
want to do that every 5 minutes, all through the day.

OK, I have one idea, but wanted to know if the WE API gives a better
solution, and if so, could someone please point me to some code or the
like, that illustrates how to implement. Here is the idea I have, but
not sure if it is all that waterproof, or if it holds any chance of
malfunctioning the app.

Sub CheckForState()
     Sleep 5000     'Let's just give it five seconds interval.
     ' code activity goes here...
     CheckForState()
End Sub 'ChackForState.

In other words, a simple, recursive sub, that will keep running all till
the app closes. Yet, what if I need to end it from running, at any given
state throughout the app execution? Like I said, not sure if this is the
best and most smooth way to handle this task, so if anyone has a better
idea, I am all ears.

Thanks,

--
David


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

Reply via email to