Jess Posted August 23, 2017 Share Posted August 23, 2017 Hi, I am trying to fetch table data from website and display the array. but, it is showing an error "Error from function _IETableWriteToArray, $_IESTATUS_InvalidDataType". Please help in the same case. Thanks Link to comment Share on other sites More sharing options...
Jess Posted August 23, 2017 Author Share Posted August 23, 2017 Hi, I am trying to do the same thing with some website, but it is always throwing an error as below. --> IE.au3 T3.0-2 Warning from function _IETableGetCollection, $_IESTATUS_NoMatch --> IE.au3 T3.0-2 Error from function _IETableWriteToArray, $_IESTATUS_InvalidDataType Please can anyone help in this case, as I have tried all the solutions provided above. Link to comment Share on other sites More sharing options...
Danp2 Posted August 23, 2017 Share Posted August 23, 2017 @Jess Your issue is different that this earlier thread. For best results, please repost your issue in a new thread and be sure to include your code so that we can hopefully assist you. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted August 23, 2017 Share Posted August 23, 2017 Post your code. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Jess Posted August 23, 2017 Author Share Posted August 23, 2017 @Danp2 I have already posted my issue in a new thread. The link is as follows https://www.autoitscript.com/forum/topic/189997-error-from-function-_ietablewritetoarray/#comment-1363971 thanks Link to comment Share on other sites More sharing options...
Jess Posted August 23, 2017 Author Share Posted August 23, 2017 #include <IE.au3> #include <Array.au3> _IEErrorHandlerRegister(MyErrFunc) Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler ; This is my custom defined error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Endfunc ;_IEErrorNotify(False) ;$iWait = 0 $oIE = _IECreate("https://cmooc.cognizant.com",0,1,0,0) MsgBox(0,"_IECreate", @error) Sleep(3000) $oTable = _IETableGetCollection ($oIE,0) ;MsgBox(0,"Object",IsObj($oTable)) MsgBox(0,"_IETableGetCollection", @error) $aTableData = _IETableWriteToArray ($oTable) MsgBox(0,"_IETableWriteToArray", @error) $iNumTables = @extended MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page") _ArrayDisplay($aTableData) Here it is. Link to comment Share on other sites More sharing options...
Danp2 Posted August 23, 2017 Share Posted August 23, 2017 This code runs fine for me -- #include <IE.au3> #include <Array.au3> _IEErrorHandlerRegister(MyErrFunc) Global $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler ; This is my custom defined error handler Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Endfunc ;_IEErrorNotify(False) ;$iWait = 0 $oIE = _IECreate("https://cmooc.cognizant.com") $oTable = _IETableGetCollection ($oIE,0) $iNumTables = @extended $aTableData = _IETableWriteToArray ($oTable) MsgBox(0, "Table Info", "There are " & $iNumTables & " tables on the page") _ArrayDisplay($aTableData) Note the placement of the line that checks @extended. Had to move this so that it captures the value at the proper time. If you are still having issues, please post the full results from the Scite output window. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
BrewManNH Posted August 23, 2017 Share Posted August 23, 2017 8 hours ago, Jess said: I have already posted my issue in a new thread. So why did you post in this thread? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Developers Jos Posted August 23, 2017 Developers Share Posted August 23, 2017 Merged the posts from the "Other" thread where they didn't belong, Please stick to one thread and no cross posting the same question! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Jess Posted August 24, 2017 Author Share Posted August 24, 2017 Hi @Jos @BrewManNH, I had posted my query in a new thread and after that I saw this thread. So, posted here. sorry for that. And I had posted my code in the thread I started. I think it got merged or by mistake. Thanks for your help. Link to comment Share on other sites More sharing options...
Jess Posted August 24, 2017 Author Share Posted August 24, 2017 Hi @Danp2 The code is still showing the same error for me. Is it something with the version or OS that I am working in. thanks Link to comment Share on other sites More sharing options...
Danp2 Posted August 24, 2017 Share Posted August 24, 2017 22 hours ago, Danp2 said: If you are still having issues, please post the full results from the Scite output window. @Jess Please do the above. Also, it helps when you can provide details when you respond. Telling us "Is it something with the version or OS that I am working in" doesn't really move the conversation along. What version of AutoIT are you running? What is your OS? Etc. Latest Webdriver UDF Release Webdriver Wiki FAQs 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