Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

vbscript wait for 5 seconds

8,227 views
Skip to first unread message

ben

unread,
Jan 2, 2004, 6:43:29 AM1/2/04
to
hi,

CAn anyone tell me how to have a wait of sleep function that can wait for 5
secons before going on via vbscript

cheers


Gavin Garley

unread,
Jan 2, 2004, 9:41:15 AM1/2/04
to
wscript.sleep 5000


Gavin D. Garley
"ben" <b...@mc.com> wrote in message
news:OY3xEXS0...@TK2MSFTNGP09.phx.gbl...

Jeff Cochran

unread,
Jan 2, 2004, 10:00:52 AM1/2/04
to
On Fri, 2 Jan 2004 11:43:29 -0000, "ben" <b...@mc.com> wrote:

>CAn anyone tell me how to have a wait of sleep function that can wait for 5
>secons before going on via vbscript

I use the Wscript.Sleep function. You could probably do something
with the Timer function, maybe:

StartTime = Timer
While Timer - StartTime < 5
Wend

Jeff

Al Dunbar [MS-MVP]

unread,
Jan 2, 2004, 5:37:39 PM1/2/04
to

"Jeff Cochran" <jcochra...@naplesgov.com> wrote in message
news:400386a5...@msnews.microsoft.com...

Wscript.Sleep is better, as it doesn't waste nearly as many CPU cycles as
the above loop.

/Al


David Holstein

unread,
Jan 4, 2004, 6:58:25 AM1/4/04
to
Hi,

As far as I understand I think all you need to do is put:


wscript.sleep 5000

David

"ben" <b...@mc.com> wrote in message
news:OY3xEXS0...@TK2MSFTNGP09.phx.gbl...

0 new messages