computergroove Posted March 23, 2015 Share Posted March 23, 2015 I have a file that changes values on occaision that looks like: 1;1 2;2 3;3 4;4 5;7 9;3 The file in called text.ini. I want to read these into a 2d array and I cannot find any examples of anyone doing it and I do not understand the function reference on the net. Can someone show me the correct syntax? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
kaisies Posted March 23, 2015 Share Posted March 23, 2015 I have not used the function, but to me the writeup sounds like: Local $aRead _FileWriteFromArray("c:\text.ini", $aRead , Default, Default, ";") If Not @error then _ArrayDisplay($aRead) EndIf Link to comment Share on other sites More sharing options...
computergroove Posted March 23, 2015 Author Share Posted March 23, 2015 I have not used the function, but to me the writeup sounds like: Local $aRead _FileWriteFromArray("c:\text.ini", $aRead , Default, Default, ";") If Not @error then _ArrayDisplay($aRead) EndIf I tried: #include <Array.au3> #Include <File.au3> Local $aRead Local $Path = @DesktopDir & "\text.ini" _FileWriteFromArray($Path, $aRead , Default, Default, ";") If Not @error then _ArrayDisplay($aRead) EndIf And it did nothing. No error either. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
Solution computergroove Posted March 23, 2015 Author Solution Share Posted March 23, 2015 #include <Array.au3> #Include <File.au3> Local $aRead[][]=[[0],[0]] Local $Path = @DesktopDir & "\temp.ini" _FileReadToArray($Path, $aRead, 0, ";") If Not @error then _ArrayDisplay($aRead) EndIf There was a typo and I got the above to work. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html Link to comment Share on other sites More sharing options...
kaisies Posted March 23, 2015 Share Posted March 23, 2015 Haha, oops. Wrote too fast Link to comment Share on other sites More sharing options...
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