PDA

Click to See Complete Forum and Search --> : TIMER / DOEVENTS?!?!?!?


Oct 18th, 2000, 03:13 PM
I am desperately in need of a timer function (that can delay the execution of a script for a predefined # of seconds) for use with vbscript in IE. I tried writing one myself, but it causes all other IE windows to pause also. Here is my code:


Sub Delay (Amount)

Dim Start

Start = Timer

While Timer < Start + Amount
Wend

End Sub


It seems as if i need the equivelant of the vb "DoEvents" function. Does anybody know of one or a working timer function????

monte96
Oct 18th, 2000, 07:09 PM
Use window.SetTimeout:


window.setTimeout "SetDate", 5, vbscript
'window.setTimeout "FunctionName", milliseconds, language