viewing paste Unknown #17908 | HTML

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
#include <MsgBoxConstants.au3>
#include <StringConstants.au3>
#include <Array.au3>
#include <File.au3>
 
Local $file = Fileread(Fileopen("Pushliste.txt"))
Dim $sc
 
Local $ArrayName = 0, _
        $iOffset = 1
 
Local $bla0[0]
Local $bla1[0]
 
FileDelete("Testerino.txt")
While 1
    $ArrayName = StringRegExp($file, '(?i)</b> bekam eine Hilfslieferung von <b>(.*?)</b>!<br>(.*?) (.*?)', 1, $iOffset)
    If @error Then ExitLoop
    $iOffset = @extended
    For $i = 0 To UBound($ArrayName) - 3
         If $ArrayName[2] = "Seelen" Then ContinueLoop
         FileWrite("Testerino.txt", $ArrayName[0] & ";" & $ArrayName[1] & @CRLF)
        _ArrayAdd($bla0, $ArrayName[0])
        _ArrayAdd($bla1, $ArrayName[1])
    Next
WEnd
 
_FileReadToArray("Testerino.txt", $sc)
;~ _ArrayDisplay($sc)
_ArrayDisplay($bla0)
_ArrayDisplay($bla1)
 
 
Local $summe = 0
 
If @error Then
    MsgBox($MB_SYSTEMMODAL, "Not Found", '"' & $bla0[0] & '" was not found in the array.')
Else
;~ _ArrayDisplay($iIndex, "Results of searching for 0 in $avArray")
 
Local $aArrayUnique = _ArrayUnique($bla0) ; Use default parameters to create a unique array.
_ArrayDisplay($aArrayUnique, "$aArray Unique") ; Display the unique array.
 
For $o = 1 To $aArrayUnique[0]
    Local $summe = 0
                    Local $iIndex = _ArrayFindAll($bla0, $aArrayUnique[$o])
;~                      _ArrayDisplay($iIndex)
 
                For $j = UBound($iIndex)-1 To 0 Step -1
;~                  ConsoleWrite($aArrayUnique[$o] & " " & $j & " ,line->" & $iIndex[$j] & " WERT: " & $bla1[$iIndex[$j]] & @CRLF )
 
                    $summe = $summe + $bla1[$iIndex[$j]]
 
                    If $j = 0 Then
                    ConsoleWrite($aArrayUnique[$o] & ": " & $summe & @CRLF)
 
                    EndIf
                    _ArrayDelete($bla0, $iIndex[$j])
                    _ArrayDelete($bla1, $iIndex[$j])
 
 
                Next
 
Next
 
EndIf
;~ _ArrayDisplay($bla0)
;~ _ArrayDisplay($bla1)
 
 
 
 
 
 
Viewed 651 times, submitted by Guest.