sensalim Posted October 30, 2007 Posted October 30, 2007 Say I have file which format is like this: ########;Description\n Example: 100;Item 1 101;Item 2 102;Item 3 etc What is the easiest way to load this file, say "test.dat" into an array in my test.au3 file? I know you'd need a global array, use fileopen, filereadline etc and fileclose... but is there any easier way? Thanks.
weaponx Posted October 30, 2007 Posted October 30, 2007 #include <array.au3> #include <file.au3> Dim $tempArray _FileReadToArray("file.txt", $tempArray) _ArrayDisplay($tempArray) Dim $myArray[$tempArray[0] + 1][2] $myArray[0][0] = $tempArray[0] For $X = 1 to $tempArray[0] $temp = StringSplit($tempArray[$X], ";") $myArray[$X][0] = $temp[1] $myArray[$X][1] = $temp[2] Next _ArrayDisplay($myArray)
sensalim Posted October 30, 2007 Author Posted October 30, 2007 What the, how come when I search on help file for filereadtoarray or _filereadtoarray, it came out nothing?
DW1 Posted October 30, 2007 Posted October 30, 2007 old version maybe... I am on v3.2.8.1 AutoIt3 Online Help
sensalim Posted October 30, 2007 Author Posted October 30, 2007 That is also my version. Can you search for that, mine says "No topics found." This sucks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now