0

Is there any way to put delay between commands e.g we have 5 command i want that run first command and wait for 3 second to run new command, Then run next command and wait for 2 second, Then run 3rd command and wait for 5 second etc etc. I found WScript.sleep or WScript.sleep()

2
  • Are you asking for vbscript or powershell??? Commented Mar 20, 2012 at 6:39
  • possible duplicate of VB script + how to create delay in VB Commented Mar 20, 2012 at 11:49

1 Answer 1

1

vbscript:

WScript.sleep(3000) '3000 milliseconds are 3 seconds

powershell:

start-sleep -seconds 3
Sign up to request clarification or add additional context in comments.

6 Comments

please read my script but it is not working. This is also my post stackoverflow.com/questions/9766258/…
Run MS office successfully but not close after given time.
Tested on windows 7 pro and work great (office 2010). -can't help more of this, I'm sorry. Look better at your environnment...
which one example you are using for testing ?
convert vbs in powershell and see if error come again! If so maybe a reinstallation of office can repair comobject. In other case try reinstalling Microsoft Windows Script Host.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.