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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a timeout in VBScript

Status
Not open for further replies.

florent

Programmer
May 12, 2003
2
FR
Hi All !

I'd like to put a Timeout in a VBScript. Can someone help me. I don't know how to do. If the execution time is longer than the timeout, the program must continue and make a special execution.

How can I do a timeout in VBScript ?

Thanks

Flo
 
If the timeout you need is to just kill the script after it runs for so many seconds then at a Command Prompt type wscript and it will bring up an option to stop a script after a specified number of seconds. If you want it for each script use the Private|Public Sub obj_Timeout(). The timeout event occurs when script execution exceeds the time allotted in the Timeout property, and the user decides to stop the exection of the script. When several ScriptControl objects are present, a Timeout event will occur only for the first ScriptControl object to time out. "obj" is always the ScriptControl object. Hope this helps.
 
Thank you very much.
I ll try this and I think I will no longer have the problem.
Thank you
Bye
Florent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top