PunkoHead Posted July 13, 2018 Share Posted July 13, 2018 Hello Guys, I am having troubles with the _FFTableWriteToArray function - it displays an error. I have the following code: #include <FF.au3> #include <Array.au3> _FFConnect() $table = _FFTableWriteToArray() _ArrayDisplay($table) As you can see, it only connects to a FF window and tries to display the table there. This is the result: __FFSendJavaScripts: Sending functions to FireFox .......... done "C:\Program Files (x86)\AutoIt3\Include\FF.au3" (3019) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aTable[$j][$i] = $aRows[$i + 1] $aTable[$j][$i] = ^ ERROR ->13:29:47 AutoIt3.exe ended.rc:1 +>13:29:47 AutoIt3Wrapper Finished. >Exit code: 1 Time: 2.395 In FF.au3 we have the following lines: 3015For $i = 0 To $iCols - 1 3016 $aRows = _FFXPath($sTable & "//tr//td[" & $i + 1 & "]", $sReturnMode, 6, $iFilter) 3017 If $aRows[0] > 0 Then 3018 For $j = 0 To $iRows - 1 3019 $aTable[$j][$i] = $aRows[$i + 1] 3020 Next 3021 EndIf 3022Next I am attaching the source code of the webpage as well - Source.htm I am also attaching my FF.au3 library Tried different versions of it, but it shows me the same error. Could you please let me know if there is a workaround here? Thank you in advance! Link to comment Share on other sites More sharing options...
ajag Posted July 13, 2018 Share Posted July 13, 2018 (edited) $aTable[$j][$i] = $aRows[$i + 1] How do you know how many dimensions $aRows has? Edited July 13, 2018 by ajag Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
PunkoHead Posted July 13, 2018 Author Share Posted July 13, 2018 Thanks @ajag However, the error that I receive is the same: __FFSendJavaScripts: Sending functions to FireFox .......... done "C:\Program Files (x86)\AutoIt3\Include\FF.au3" (3019) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $aTable[$j][$i] = $aRows[$j + 1] $aTable[$j][$i] = ^ ERROR Link to comment Share on other sites More sharing options...
ajag Posted July 13, 2018 Share Posted July 13, 2018 Try For $i = 0 To $iCols - 1 $aRows = _FFXPath($sTable & "//tr//td[" & $i + 1 & "]", $sReturnMode, 6, $iFilter) If IsArray($aRows) Then _ArrayDisplay($aRows) EndIf If $aRows[0] > 0 Then For $j = 0 To $iRows - 1 $aTable[$j][$i] = $aRows[$i + 1] Next EndIf Next And see how many rows there are. And then compare it to [$I + 1] PunkoHead 1 Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
PunkoHead Posted July 13, 2018 Author Share Posted July 13, 2018 @ajag Ok, now I got some results: Rows - 394 Rows - 394 Rows - 393 Rows - 390 Rows - 390 Rows - 361 Rows - 3 I guess because of the different results, I am not receiving any data? Link to comment Share on other sites More sharing options...
PunkoHead Posted July 18, 2018 Author Share Posted July 18, 2018 Still not sure how to fix this. Can anyone assist me with this? 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