Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Wait command

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3499
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Wait command
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Wait command - 6/23/2005 12:48:43 AM   
  e2000era

 

Posts: 11
Score: 0
Joined: 6/17/2005
From: USA
Status: offline
Does anyone know how to wait 15 seconds to wait before it runs the next command? ( In visual Basic 6)

Thanks
Dali
 
 
Post #: 1
 
 Re: Wait command - 6/23/2005 1:44:39 AM   
  Xandros

 

Posts: 100
Score: 0
Joined: 6/23/2005
From:
Status: offline
Try this...

Delay 15

Sub Delay(Seconds As Double)

' delay for x seconds.
' this sub has a very low CPU overhead.

Const OneSecond As Double = 1# / (1440# * 60#)
Dim WaitUntil As Date

WaitUntil = Now + (OneSecond * Seconds)
Do Until Now > WaitUntil
Sleep 100
DoEvents ' Allow windows messages to be processed
Loop

End Sub

(in reply to e2000era)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Wait command Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts