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()
-
Are you asking for vbscript or powershell???CB.– CB.2012-03-20 06:39:28 +00:00Commented Mar 20, 2012 at 6:39
-
possible duplicate of VB script + how to create delay in VBHelen– Helen2012-03-20 11:49:58 +00:00Commented Mar 20, 2012 at 11:49
Add a comment
|
1 Answer
vbscript:
WScript.sleep(3000) '3000 milliseconds are 3 seconds
powershell:
start-sleep -seconds 3
6 Comments
Mulesoft Developer
please read my script but it is not working. This is also my post stackoverflow.com/questions/9766258/…
Mulesoft Developer
Run MS office successfully but not close after given time.
CB.
Tested on windows 7 pro and work great (office 2010). -can't help more of this, I'm sorry. Look better at your environnment...
Mulesoft Developer
which one example you are using for testing ?
CB.
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.
|