## Recommended Posts

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

##### Share on other sites

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 #### Share this post ##### Link to post ##### Share on other sites 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 #### Share this post ##### Link to post ##### Share on other sites #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

##### Share on other sites

Haha, oops. Wrote too fast

## Create an account

Register a new account