Jump to content

Ini Read/Write w/ Arrays issues


Recommended Posts

#include <GUIConstantsEx.au3>

Opt('MustDeclareVars', 1)

Global $var, $msg, $combo

Dim $combo[4];, $x

GUICreate("My GUI combo")
$var = IniReadSection("C:\myfile.ini", "section1")
$combo[0] = GuiCtrlCreateCombo("", 10, 10)
$combo[1] = GuiCtrlCreateCombo("", 10, 50)
$combo[2] = GuiCtrlCreateCombo("", 10, 90)
$combo[3] = GuiCtrlCreateCombo("", 10, 130)



For $a = 1 To $var[0][0];And $x = 0 To $combo[4] -- You can only have one per line?
;GUICtrlSetData($combo[$x], $var[$a][1])
    GUICtrlSetData($combo[3], $var[$a][1])
Next
GUISetState()
EndIf

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

I guess I'm quite ignorant on arrays, because I understand a little better... but not much. Where should I look to figure out how to do this? How should I look at this array? Is an array even what I'm looking for?

BTW, for the ini file this is what I have:

[section1]

Key0=Unit1

Key1=Unit2

Key2=Unit3

;Etc.

children may smile; the wise ponder- Dr. Holmes of Hardvard Medical School on an Ether BingeLove Makes The World Go Round?So does five shots of tequila. What's your point?[quote name='Valik' date='Jun 5 2008, 05:13 PM']wraithdu, 24 hours. Said I have a bad attitude, just driving the point home with a ban.[/quote]This is classic. :)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...