Reputation: 605
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_OnReadyStateChange
' do something
End sub
oHTTP.Send
Upvotes: 2
Views: 10114
Reputation: 1280
You can use either ServerXmlHttp with setTimeouts, or just use windows.XMLHttpRequest instead.
Upvotes: 2