I have problems reading a text file into a variable or into a field for further processing.
Please take a look a my code snippet:
Code: Select all
; No problems writing a big Testfile
z := "This is a simple sentence with virtually no meaning, just to demonstrate something!"
Loop 30000
FileAppend % A_Index " . " z "`n" ,Testfile.txt
; But how can I store the contents of Testfile.txt into a variable or an array?
a :=[] ; doesn't work
FileRead varText, Testfile.txt
Loop,parse, varText , % Chr(10)
a.push(A_LoopField)
b:=[] ; doesn't work
Loop, Read, Testfile01.txt
b.push(A_LoopReadLine)
Obviously the variables or arrays don't have the capacity to
store the contents of my Testfile.txt.
I hope you can help me and many thanks in advance.