Results 1 to 2 of 2

Thread: TIMER / DOEVENTS?!?!?!?

  1. #1
    Guest

    Angry

    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:

    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????

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Use window.SetTimeout:

    Code:
    window.setTimeout "SetDate", 5, vbscript
    'window.setTimeout "FunctionName", milliseconds, language
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width