Versuche jetzt schon eine ganze weile mein 2d Array zu speichern und ständig stürzt mein Script ab.. kann mir jemand sagen was der Fehler ist?
[autoit]
#include <ie.au3>
#include <array.au3>
#include <string.au3>
#include <file.au3>
Global $arrProxy[1]
Global $arrPort[1]
$oIE = _IECreate("http://www.proxy-listen.de/Proxy/Proxyliste.html",0,0,1)
for $j=1 to 3
if $j = 1 Then
$oSubmit = _IEGetObjByName ($oIE, "submit") ; beim ersten Durchlauf wird der "Anzeigen" Button gedrückt
Else
$oSubmit = _IEGetObjById ($oIE, "next_page") ; bei weiteren Durchläufen wird der "Nächste Seite" Button gedrückt
EndIf
_IEAction ($oSubmit, "click")
_IELoadWait ($oIE)
$sHTML = _IEBodyReadHTML ($oIE)
$arrTempProxy = _StringBetween($sHTML, 'blank">', '</a>') ;quelltext lesen Proxy
$arrTempPort = _StringBetween($sHTML,'&port=','&') ;quelltext lesen Port
For $i = 0 to UBound($arrTempProxy)-1 ;Proxy extrahieren
if StringRegExp($arrTempProxy[$i],"\d+\.\d+\.\d+\.\d+",0) = 1 Then
_ArrayAdd($arrProxy,$arrTempProxy[$i])
EndIf
Next
For $k = 0 to UBound($arrTempPort)-1 ;Port extrahieren
if StringRegExp($arrTempPort[$k],"\d+",0) = 1 Then
_ArrayAdd($arrPort,$arrTempPort[$k])
EndIf
Next
Next
[/autoit][autoit][/autoit][autoit]$iRows = UBound($arrProxy) ; verbindet Proxys und Prot in ein 2D Array
If $iRows < UBound($arrProxy) Then $iRows = UBound($arrPort) - 1
Dim $aOutput[$iRows][2]
[/autoit][autoit][/autoit][autoit]For $x = 0 To $iRows - 1
If $x > UBound($arrProxy) - 1 Then ContinueLoop
$aOutput[$x][0] = $arrProxy[$x]
If $x > UBound($arrPort) - 1 Then ContinueLoop
$aOutput[$x][1] = $arrPort[$x]
Next
_ArrayDisplay($aOutput)
_FileWriteFromArray(@ScriptDir & "\proxyliste.txt",$aOutput,1,UBound($aOutput)-1,":");speichert Proxy:Port in txt