smellyfingers Posted September 29, 2012 Share Posted September 29, 2012 Hey, is it possible to avoid program crash when interaction with IE object fails? Like if the object isn't found it waits until it is, i've tried _IEWaitload and _IEWaitLoadTimout before interacting but doesn't seem to work so i think i need some function that holds or loops and then try again, probably simple but i can't get it working. The program can run for different amount of times before crash when suddenly interaction fails, just need a few pointers in the right direction, is it possible to use the @error or just a wait for loop? If you take google search for example: #include <IE.au3> Local $oIE = _IEAttach("Mystart") WinActivate("Mystart") $oIE.document.forms.homepage_app_searchform.q.value = "1234567890" Sleep(300) _IELoadWait ($oIE) WinActivate("Mystart") $oIE.document.forms.homepage_app_searchform.childNodes.item(1).click Sleep(300) Now my program crash in a similar way if the "$oIE.document.forms.homepage_app_searchform.q.value" interaction fails, but how can i tell the program to try again when this error occurs or is it a fatal error? Link to comment Share on other sites More sharing options...
JohnOne Posted September 29, 2012 Share Posted September 29, 2012 _IEErrorHandlerRegister() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
smellyfingers Posted September 29, 2012 Author Share Posted September 29, 2012 Thanx John, tried a loop with over 300 test runs, completed without crashes! 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