Alexander
Tue Jan 24 03:40:27 CST 2006
jkavanagh58 schrieb:
> I am trying to automate the daily morning system checks. Part of the
> items to check is a bunch of URL's. I have a script that opens them
> all in a new window for manual verification. It seems possible but I
> can't figure out how to determine the status of the recently navigated
> url. Is there anyway way to use .NavigateError or some other method to
> determine if a 404 error type is the result of the navigate function?
NavigateError is an event that occurs on HTTP-errors, like 404.
It also tells you the errorcode, anything but 200 is error.
set ie = wscript.createobject("internetexplorer.application", "ie_")
ie.Navigate "
http://www.cnn.com/iunknown.nodispatch.aspx"
ie.Visible = true
While 1 : WSH.Sleep 1000 : Wend
Sub ie_NavigateError(pDisp, URL, TargetFrameName, _
StatusCode, ByRef Cancel)
WSH.Echo "NavigateError, url: ", URL, vbcr & _
"StatusCode:", StatusCode
End Sub
Sub ie_Quit
WSH.Quit
End Sub
Mfg,
Alex