Hello again dear AutoIt Community. Today I have a problem regarding Arrays. The faulty code is shown below. $oIE = _IECreate($idURL, 0, 1, 1, 0)
_IELoadWait($oIE)
$links = _IELinkGetCollection($oIE)
Global $aTxt[1]
Local $iIndex = 0
For $link in $links
_ArrayInsert($aTxt, $iIndex, $link.innerText)
$iIndex += 1
ConsoleWrite("$Number of Texts (links) = " & $iIndex & @CRLF)
Next
If IsArray($aTxt) Then
_ArrayDisplay($aTxt, "1D array")
EndIf
;This works
;If _ArrayFindAll($aTxt, "Fairy") Then
; MsgBox(0, "Success", "Found all instances and saved it in an array (apparently), BUT WHERE?")
;EndIf
;This results in an error
Local $aiResult = _ArrayFindAll($aTxt, "Fairy")
If IsArray($aiResult) Then
_ArrayDisplay($aiResult)
Else
MsgBox(0, @error, "$aiResult is not an array." & @CRLF & "Error Code " & $aiResult)
EndIf
ConsoleWrite("The code executed without errors." & @CRLF)
ExitThe symptoms I'm experiencing are that I cannot get hold of an array that should have been created by "_ArrayFindAll". The only thing I'm presented with is an error code "-1" (sets the @error flag to non-zero). I'd be very grateful for anyone willing to help out. Many Thanks in advance, ~Medallyon