litlmike Posted April 4, 2008 Posted April 4, 2008 I want to read the values in an .ini file, then make them available to put into a GUI Edit Box. My thought was to store the values into an array, then put them into a string delimited by @CRLF so that the GUI edit box could accept the values. I am stuck getting the values into an array. I used _ArrayToString(), but it seems to only use the 1st dimension I believe. How can I arrive at the solution? ;Make .ini file Global $iniPath = @ScriptDir & "\SaveData.ini" If NOT FileExists($iniPath) Then _FileCreate ( $iniPath ) IniWriteSection ($iniPath, "Destinations", "") IniWrite ( $iniPath, "Destinations", "key", "value" ) IniWriteSection ($iniPath, "Categories", "") IniWrite ( $iniPath, "Categories", "key", "value" ) EndIf $Edit1_Text_Array = IniReadSection ( $iniPath, "Destinations") $Edit1_Text =_ArrayToString($Edit1_Text_Array, @CRLF) MsgBox (0, "", $Edit1_Text) $Edit1_Text_Array = IniReadSection ( $iniPath, "Categories") $Edit2_Text = _ArrayToString($Edit1_Text_Array, @CRLF) MsgBox (0, "", $Edit2_Text) ;end Ini file _ArrayPermute()_ArrayUnique()Excel.au3 UDF
PsaltyDS Posted April 4, 2008 Posted April 4, 2008 Dude, Babushka, litlmike... you've been around here long enough not to need this, but: Global $iniPath = @ScriptDir & "\SaveData.ini" Global $sString, $Edit1_Text_Array $Edit1_Text_Array = IniReadSection($iniPath, "Destinations") For $n = 1 To $Edit1_Text_Array[0][0] $sString &= $Edit1_Text_Array[$n][0] & " = " & $Edit1_Text_Array[$n][1] & @CRLF Next MsgBox(64, "Result", $sString) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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