Aeterna Posted April 17, 2009 Share Posted April 17, 2009 (edited) CODE#include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "www.example.com") _IELoadWait($oIE) func CheckError() $body = _IEBodyReadText($oIE) $error = StringRegExp($body, "You have", 0) If $error = 1 Then MsgBox = "Error" EndIf EndFunc CheckError() Shouldn't this code work? Please let me know whats wrong! Edited April 17, 2009 by Aeterna Link to comment Share on other sites More sharing options...
Mat Posted April 17, 2009 Share Posted April 17, 2009 does this work? I neatened it a bit and removed some unneccessary functions. #include <IE.au3> $oIE = _IECreate("www.example.com") _IELoadWait($oIE) CheckError() func CheckError() Local $body $body = _IEBodyReadText($oIE) If StringRegExp($body, "(You have)", 0) Then MsgBox (48, "Error", "There was an error loading interent explorer") EndIf EndFunc; ==> CheckError AutoIt Project Listing Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now