Hallo,
Ich komm da nicht so ganz weiter.
Die Grund Funktion will nicht mal bei mir.
Ich habe folgendes als bsp in ein txt Log stehen:
Code
2020-10-01 19:53:13.360 [BBS] Input_coin_NW
2020-10-01 19:53:13.360 [BBS] addCoin: 10000 von 4
2020-10-01 19:53:13.371 [BBS] updateAcceptance cashmode: 0
2020-10-01 19:53:13.371 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 19:53:20.250 [BBS] Sys_coin_NW
2020-10-01 19:53:20.250 [BBS] addCoin: -10000 von 5
2020-10-01 19:53:20.257 [BBS] updateAcceptance cashmode: 0
2020-10-01 19:53:20.258 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 20:56:46.419 [BBS] Input_coin_NW
2020-10-01 20:56:46.419 [BBS] addCoin: 20000 von 4
2020-10-01 20:56:46.429 [BBS] updateAcceptance cashmode: 0
2020-10-01 20:56:46.429 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 20:56:53.961 [BBS] Sys_coin_NW
2020-10-01 20:56:53.961 [BBS] addCoin: -20000 von 5
2020-10-01 20:56:53.967 [BBS] updateAcceptance cashmode: 0
2020-10-01 20:56:53.968 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 20:58:21.829 [BBS] Input_coin_NW
2020-10-01 20:58:21.829 [BBS] addCoin: 1000 von 3
2020-10-01 20:58:21.840 [BBS] updateAcceptance cashmode: 0
2020-10-01 20:58:21.840 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 20:58:21.840 [BBS] WM_INTCON_FLOAT_LEVEL
2020-10-01 20:58:21.840 [BBS] updateAcceptance cashmode: 0
2020-10-01 20:58:21.840 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 20:58:23.196 [BBS] Sys_coin_NW
2020-10-01 20:58:23.196 [BBS] addCoin: -1000 von 5
2020-10-01 20:58:23.201 [BBS] updateAcceptance cashmode: 0
2020-10-01 20:58:23.201 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 21:10:44.222 [BBS] Input_coin_NW
2020-10-01 21:10:44.222 [BBS] addCoin: 20000 von 4
2020-10-01 21:10:44.232 [BBS] updateAcceptance cashmode: 0
2020-10-01 21:10:44.232 [BBS] SendD BS_AA_COINACCEPT
2020-10-01 21:11:09.492 [BBS] Sys_coin_NW
2020-10-01 21:11:09.492 [BBS] addCoin: -2000 von 5
2020-10-01 21:11:09.499 [BBS] updateAcceptance cashmode: 0
2020-10-01 21:11:09.499 [BBS] SendD BS_AA_COINACCEPT
Alles anzeigen
Ich würde hier gern ein Script schreiben wo ich das Log so ausgelesen bekomm das mir ein Excel, CSV nur die wichtigsten Daten angezeigt werden.
zb.:
10000 , 4
-10000 , 5
20000 , 4
Hier mal mein Script:
C
#include <Array.au3>
#include <File.au3>
#include <String.au3>
Global $sFileName = @ScriptDir & "\Log_test.txt"
Example()
Func Example()
Local $aFileRead
Local $aFileLine[0][2]
_FileReadToArray($sFileName, $aFileRead)
If @error Then Exit MsgBox(16, "Error", "Unable to read: " & $sFileName)
ReDim $aFileLine [UBound($aFileRead)][2]
For $i = 0 To UBound($aFileRead)
$aFileLine[$i][0] = _StringBetween($aFileRead[$i], "addCoin: ", " von")
If Not @error Then ExitLoop
Next
_ArrayDisplay($aFileLine)
EndFunc
Alles anzeigen
Bekomm nur Blödsinn heraus.
lg
Speedy