2011-02-27 71 views
2

是否有另一個ProgID而不是「MSXML2.XMLHTTP」,它允許您在中設置超時VBScriptOnReadyStateChange或類似的也必須在VBScript中工作。HTTP Resquest的超時

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 

回答