Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making VBScript wait

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How can I make VBscript pause for about a second ?

Is there a wait or pause command?
 
yup. put the following code just before the script that you want to run after the pause:

Dim PauseTime, Start

PauseTime = 1 'Set Duration
Start = Timer 'Set start time

Do While Timer < Start + PauseTime
'nothing happening
Loop

'...continue with code
 

ukrpn,

The code from Barking Frog uses CPU time. There is a SLEEP funtion

Wscript.sleep (1000) ' In millisecond, pauses for 1 second

fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top