Jan 22, 2011 #1 gustaf111 Programmer Joined Jan 16, 2011 Messages 87 Location SE Hello all, Are there any sleep function available in VBS ? I can not find any ... I would like to sleep 100 ms för eaxh stepp in a for loop. For i = 1 to 10 ... ... "Sleep 100 ms" Next Gustaf
Hello all, Are there any sleep function available in VBS ? I can not find any ... I would like to sleep 100 ms för eaxh stepp in a for loop. For i = 1 to 10 ... ... "Sleep 100 ms" Next Gustaf
Jan 22, 2011 #2 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR WScript.Sleep 100 Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Jan 22, 2011 Thread starter #3 gustaf111 Programmer Joined Jan 16, 2011 Messages 87 Location SE Thanks PHV, I have tried that but is does not seem to work, it just pass without sleeping Upvote 0 Downvote
Jan 22, 2011 Thread starter #4 gustaf111 Programmer Joined Jan 16, 2011 Messages 87 Location SE I checked again and the loop only runs one time when I insert WScript.Sleep 100 last in the loop. Gustaf Upvote 0 Downvote
I checked again and the loop only runs one time when I insert WScript.Sleep 100 last in the loop. Gustaf
Jan 24, 2011 #5 wvdba IS-IT--Management Joined Jun 3, 2008 Messages 465 Location US that's because the time is so short, you may not notice it. 10 times 100 mili-second amounts to one second. that's all you see. you may try this: Code: for i = 1 to 10 msgbox "going to sleep" wscript.sleet 100 msgbox "coming out of sleep" next you will see that it stleeps 10 times for a duration of 100 ms. Upvote 0 Downvote
that's because the time is so short, you may not notice it. 10 times 100 mili-second amounts to one second. that's all you see. you may try this: Code: for i = 1 to 10 msgbox "going to sleep" wscript.sleet 100 msgbox "coming out of sleep" next you will see that it stleeps 10 times for a duration of 100 ms.