[ QUOTE ]
How can I do wait 20 sec in VBS?
In QTP I write wait (X) but I want to put wait in vbs file and run it from QTP.
wait not good....
[/ QUOTE ]
If you are only executing the vbs file from QTP (ie you aren't using it as a stand-alone vbs file for other activities) I'm pretty sure you can get away with having Wait(20) in it and QTP will execute it as such.
It's been a year almost since I last used QTP so I could be wrong...
I'm not a complete idiot - some parts are missing.
<font class="small">Code:</font><hr /><pre>
' Wait the specified number of seconds. But if the
' end-of-wait time is beyond midnight then don't wait.
t = timer() + nSeconds
if t < 86399 then ' 86400 = 24 hrs * 60 minutes * 60 seconds
while timer() < t