scanner96 Posted May 16, 2016 Share Posted May 16, 2016 Hi I have this script. Always get the error variable muste br type Object. Where is the ERROR? #include <IE.au3> #include <MsgBoxConstants.au3> Local $i = 0 Local $oIE = _IECreate("http://www.....") do Local $sHTML = _IEBodyReadHTML ($oIE) If StringInStr ($sHTML, "Alira") or StringInStr ($sHTML, "Meli") then _IELinkClickByText($oIE, "10",0,1) else _IELinkClickByText($oIE, "1",0,1) endif Until $i = 9 thanks Arne Link to comment Share on other sites More sharing options...
water Posted May 16, 2016 Share Posted May 16, 2016 Welcome to AutoIt and the forum! The error is caused by you not posting the full error message you get. You call _IE* functions multiple times. How should we guess which one fails My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted May 16, 2016 Share Posted May 16, 2016 BTW: When you post code, please use code tags (the icon marked "<>" in the editor). So we get syntax highlighting and the code is much easier to read My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Trong Posted May 16, 2016 Share Posted May 16, 2016 Try like this: #include <IE.au3> Local $oIE = _IECreate("http://www..........") If Not IsObj($oIE) Then Exit MsgBox(48, "", "_IECreate() Error", 3) Local $i = 0 Do $i += 1 Local $sHTML = _IEBodyReadHTML($oIE) If @error Then ContinueLoop If StringInStr($sHTML, "Alira") Or StringInStr($sHTML, "Meli") Then _IELinkClickByText($oIE, "10", 0, 1) Else _IELinkClickByText($oIE, "1", 0, 1) EndIf Until $i = 9 _IEQuit($oIE) Regards, Link to comment Share on other sites More sharing options...
jdelaney Posted May 17, 2016 Share Posted May 17, 2016 https://www.autoitscript.com/forum/topic/182515-script-crashes-after-10-14-loops/?do=findComment&comment=1310839 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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