loNetScape = CREATEOBJECT("Netscape.Network.1") IF loNetScape.Open("http://www.somewhere.com/index.html",0,"",0,"") DO WHILE loNetScape.GetStatus()=0x0100 ENDDO IF loNetScape.GetStatus()=0x0000 lcBuffer = "" lcTemp = SPACE(32768) DO WHILE !loNetScape.IsFinished() lnLength = loNetScape.Read(@lcTemp,4000) IF lnLength>0 lcBuffer = lcBuffer+LEFT(lcTemp,lnLength) ENDIF ENDDO IF lcBuffer$"Error 404" WAIT WINDOW "Some stuff" ELSE WAIT WINDOW "Other stuff" ENDIF ? lcBuffer ENDIF loNetScape.Close() ENDIF[...]
Do While oIE.Document.ReadyState <> "complete" >>Enddo >> >>lcHTML = oIE.document.documentElement.innerHTML >>If Atc("Error 404", lcHTML)<>0 Then >> Some Code >>else >> Some Code >>Endif>>