Hallo Zusammen,
gibt es eine schnellere Methode um strings miteinander zu verbinden als:
[autoit]$sString_ges = $sString_1 & $sString_2
[/autoit]?
Mein Code sieht in etwa so aus:
Spoiler anzeigen
; Path to hex-file/s-record
$sFilepath = FileOpenDialog("Choose hex file", @ScriptDir, "hex/s-rocord (*.hex; *.s19; *.mot)")
If @error Then Exit MsgBox(4096,"ERROR","Reading sourcefile failed!!!")
; Handle to hex-file/s-record
$hFile = FileOpen($sFilepath, 0)
$sRaw = ""
[/autoit] [autoit][/autoit] [autoit]$begin = TimerInit()
[/autoit] [autoit][/autoit] [autoit]while 1
[/autoit] [autoit][/autoit] [autoit]$string= FileReadLine($hFile)
If @error = -1 Then ExitLoop
; String is Data Record in hex format
If StringMid($string, 1, 1) = ":" AND StringMid($string, 8, 2) = "00" Then
$sRaw = $sRaw & StringMid($string,10, "0x" & StringMid($string, 2, 2)*2)
EndIf
Wend
[/autoit] [autoit][/autoit] [autoit]ConsoleWrite(TimerDiff($begin) & @CRLF)
[/autoit]Bei einem File, das ca. 1Mb groß ist, dauert es bereits ca. 12 Sekunden auf meinem Rechner. Bei 3Mb schon ca. 90 Sekunden.
Einer ne Idee?
Gruß...