Is there another ProgID instead of "MSXML2.XMLHTTP" that lets you set a timeout in VBScript? OnReadyStateChange or similar must also work in VBScript.
Set oHTTP = CreateObject("MSXML2.XMLHTTP")
oHTTP.timeout = 10000 'Throws an error
oHTTP.Open "GET", "http://www.google.com", True
oHTTP.OnReadyStateChange = GetRef("oHTTP_OnReadyStateChange")
Sub oHTTP_OnRea开发者_运维问答dyStateChange
' do something
End sub
oHTTP.Send
You can use either ServerXmlHttp with setTimeouts, or just use windows.XMLHttpRequest instead.
精彩评论