furrycow Posted April 11, 2010 Share Posted April 11, 2010 Just a quickie... is there a function of any kind to determine whether or not something has just happened in IE (im using it embedded if that makes a difference). So for instance, if a link on a page was clicked? Or even more efficiently, a way of determining when a web address of an instance has changed. Currently, i've got this method, but it is hardly accurate, and although it does pick it up most of the time, it does quite often fail, for obvious reasons. #include <IE.au3> $oIE=_IECreate("about:blank") $address2="about:blank" While 1 $address1 = _IEPropertyGet($oIE, "locationurl") If $address1 <> $address2 Then Msgbox(0,"","The web address has changed") $address2= _IEPropertyGet($oIE, "locationurl") Sleep(500) WEnd Is there a better solution?? Thanks. Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
Valuater Posted April 11, 2010 Share Posted April 11, 2010 Maybe,,, #include <IE.au3> $oIE = _IECreate("about:blank") $handle = WinGetHandle("") $address2 = "about:blank" $text2 = "" ; While WinExists($handle) $address1 = _IEPropertyGet($oIE, "locationurl") If $address1 <> $address2 Then MsgBox(0, "", "The web address has changed") $address2 = $address1 EndIf $text = _IEBodyReadHTML($oIE) If $text <> $text2 Then MsgBox(0, "", "The text has changed") $text2 = $text EndIf ; etc. etc. etc Sleep(100) WEnd 8) Link to comment Share on other sites More sharing options...
furrycow Posted April 11, 2010 Author Share Posted April 11, 2010 Perfect, thanks! Although just a heads-up, the HTML reading part of it came up in error, when i was changing webpages fast, it was some object error in the IE.au3. Thanks again! Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
Valuater Posted April 11, 2010 Share Posted April 11, 2010 Welcome! Just add the IE error handler. Be sure to see.... _IEErrorHandlerRegister() and _IEErrorNotify() 8) 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