When writing an array to a file, I get this error in the console..
C:\Program Files\AutoIt3\Include\File.au3 (272) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$s_Temp &= $s_Delim & $a_Array[$x][$y]
$s_Temp &= $s_Delim & ^ ERROR
->16:23:42 AutoIT3.exe ended.rc:1
>Exit code: 1 Time: 5.344
Here is the code.
C:\Program Files\AutoIt3\Include\File.au3 (272) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.:
$s_Temp &= $s_Delim & $a_Array[$x][$y]
$s_Temp &= $s_Delim & ^ ERROR
->16:23:42 AutoIT3.exe ended.rc:1
>Exit code: 1 Time: 5.344
Here is the code.
[ autoit ]
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <guilistview.au3> #include <StaticConstants.au3> #include <IE.au3> #include <array.au3> #include <File.au3> $fIni = "c:\temp\zip.ini" $count = 3 $zip = IniRead($fIni, "Zip", $count, "NotFound") $url = "http://hosted.where2getit.com/truevalue/tv2.html?form=locator_search&addressline=42431&search=&geoip=1" $oIE = _IECreate($url) _IENavigate($oIE, $url) _IEPropertySet($oIE, "silent", "true") Local $oForm = _IEFormGetObjByName($oIE, "locator_search") Local $oText = _IEFormElementGetObjByName($oForm, "inputaddress") _IEFormElementSetValue($oText, $zip) Send("{ENTER}") _IETableReport($oIE) Func _IETableReport($oIE) Local $iIndex = 0 $colTables = _IETableGetCollection($oIE) For $oTable In $colTables ;===== stolen from IE include _IETableWriteToArray, to find errors Local $i_cols = 0, $tds, $i_col Local $trs = $oTable.rows For $tr In $trs $tds = $tr.cells $i_col = 0 For $td In $tds $i_col = $i_col + $td.colSpan Next If $i_col > $i_cols Then $i_cols = $i_col Next Local $i_rows = $trs.length If $i_cols = 0 Or $i_cols = 0 Then MsgBox(1, "Failure to make good array from table", "Column count=" & $i_cols & " Row count =" & $i_cols) ;======== end of , find array problems Else Global $aTableData = _IETableWriteToArray($oTable) ;_ArrayDisplay($aTableData, "Table #" & $iIndex) $iIndex += 1 If $iIndex = 8 Then _FileWriteFromArray("C:\temp\tv1.txt", $aTableData) Else Sleep(10) EndIf EndIf Next EndFunc ;==>_IETableReport