|
Re:WScript.Sleep for HTA?
This is what I use:
' Sleep for HTA by Malcolm McCaffery
Sub Sleep(intMilliSecs)
CONST HideWindow=0
CONST WaitForCompletion=TRUE
' Because HTA doesn't use Windows Script Host, it uses IE Script Host we
can't use WScript.Sleep
' Workaround: send one ping command to fake address with a wait for reply
value set in milliseconds
cmd="cmd /c ping 1.1.1.1 -n 1 -w " & intMilliSecs
With CreateObject("WScript.Shell")
.Run cmd,HideWindow,WaitForCompletion
End With
End Sub
|