You could either run cmd with the /c switch and the
timeout command. You could use the Windows Shell to run the command. Alternatively, you could just use oScript.Execute "Wait 10" to wait for 10 seconds. oScript.Execute will execute valid ProvideX and Wait is a directive that will tell the program to wait for the number of seconds that follows the directive.
However, I personally wouldn't do it this way because you may not really know when you can expect the first script to finish and if you pad it to something too large, you are just wasting time. I would get it to run sequentially instead. I was under the impression that InvokeButton would normally run sequentially and wait for each one to finish but if that is not what you are experiencing, then what you might have to do is try putting a retVal = oUIObj.HandleScriptUI() after each InvokeButton line.
The other option would be to call the button script in another manner. At one point, I recall figuring out how to trigger a User Defined Script event within another script but I can't recall if I ever did that for a button script but suspect it is doable. Alternatively, you might be able to get away with reading the script file assigned to the button and then executing it in-line with your code but this approach to read and execute the .vbs file should be tested to make sure there aren't any conflicts with variables and object handles.
Include other files in VBScript – CTGlobal (ctglobalservices.com)------------------------------
David Speck II
Tennessee Software Solutions
------------------------------