Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continuosly run a program

Status
Not open for further replies.

fortage

MIS
Jun 15, 2000
329
US
I'm trying to write the code that will run a sub every 45 seconds, continuously.
I've been unable to figure this out, any ideas???
 
VBScript on a web page, or as a standalone script?

If the former, then it's pretty easy, since we can create an instance of a Timer control using the <OBJECT> tag, and respond to its events.

If the latter, then it is somewhat harder...
 
You can do it in VB with a Timer Object that you put on your form, and on the timer event you call you procedure.Be sure to set Interval propety to the desired value.

If you are more familiar with VBScript - you can add the full functionality of VBScript by adding to References the library SCRRUN.DLL which is in tour System directory. after thet you can create VBScript objects with Dim.. As New... or Dim... Set ...

Hope of being of some help,s-) Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...

 
This is just a VBscript, not a VB app. I'm not certian if I understand you correctly but are you saying it is possible to use the Timer Object in VBscript? How?
Otherwise how else could you pause/sleep an VBscript?

Thanks
 
Simply pausing in VBScript is quite easy:

wscript.sleep 5000

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top