Func STR($A, ByRef $B1, ByRef $B2)
$fileA = FileOpen(@ScriptDir & "" & $A, 0)
If $fileA = -1 Then
MsgBox(0, "Error", "Unable to open " $A)
Exit
EndIf
While 1
$lineA = FileReadLine($fileA)
If @error = -1 Then ExitLoop
$arrayA = StringSplit($lineA, "=")
If @Error then ContinueLoop
FileWrite(@ScriptDir & "\A1.txt", $arrayA[1] & @CRLF)
FileWrite(@ScriptDir & "\A2.txt", $arrayA[2] & @CRLF)
WEnd
_FileReadToArray(@ScriptDir & "\A1.txt", $B1)
_FileReadToArray(@ScriptDir & "\A2.txt", $B2)
FileDelete(@ScriptDir & "\A1.txt")
FileDelete(@ScriptDir & "\A2.txt")
EndFunc ;==>STR
|