Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


WScript.sleep

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> WScript.sleep
  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 >>
 WScript.sleep - 2/5/2003 1:36:53 PM   
  amglassett

 

Posts: 2
Score: 0
Joined: 2/4/2003
From:
Status: offline
I have one html file and about 10 .vbs files which implement the html file. I am trying to get the vbscript to pause until another function is finished using the wscript.sleep function. When I run the following code, it errors out and says object needed: Wscript.
for i = 0 to 15
SomeFunction()
wscript.sleep 1000
next

Does anyone have any ideas??
Thanks in advance
 
 
Post #: 1
 
 Re: WScript.sleep - 2/8/2003 4:59:07 PM   
  Krabat

 

Posts: 3
Score: 0
Joined: 2/8/2003
From:
Status: offline
If the "SomeFunction()" is another script, you can execute it via the:

bolWaitOnReturn = True
Set objShell = CreateObject(WScript.Shell)
returnCode = objShell.Run(your_script, parameters, bolWaitOnReturn)


Now the script waits for your_script to finish (only if bolWaitsOnReturn is "True") and then goes on with further command execution. Hope it helps.


cu,

Krabat

(in reply to amglassett)
 
 
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 >> WScript.sleep 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