Thoughts?
What I have so far:
Read data from the ini to the list box - check.
Rearrange in list - working on it with an example using a method found here:
http://www.autoitscript.com/forum/topic/...eview-with-edit-and-drag-n-dro
Write what's in the list box back into the ini file in the order that it is in the list box - no clue. I know how to write to an ini section, but not read all the contents out of the list box at once instead of what is just selected...or if there is a way to select all the entries then write it - that would work probably, but again, the order in which the items are in is paramount.
Same thing for a combo box, but if I can get the list to work right I think i can get the combo box relatively easy.
Code so far, for what it's worth...
#include <array.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> $listString = "" $comboString = "" $listArray = IniReadSection("test_list.ini", "itemlist") ;~ _ArrayDisplay($listArray) ;~ Exit $listString = "New|" For $l = 1 to $listArray[0][0] if $l <> $listArray[0][0] Then $listString &= $listArray[$l][1] & "|" Else $listString &= $listArray[$l][1] EndIf Next ;~ MsgBox(0x40000, "", $listString) $comboArray = IniReadSection("test_combo.ini", "itemlist") #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form2", 360, 305, 428, 264) $List1 = GUICtrlCreateList("", 16, 16, 161, 253, $LBS_standard) ; add list ini array GUICtrlSetData($List1, $listString) $Combo1 = GUICtrlCreateCombo("", 192, 16, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($Combo1, $listString) $saveBTN = GUICtrlCreateButton("Save", 192, 100, 100, 30) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $saveBTN $listdata = GUICtrlRead($List1) ; will only read what is selected, alternatives? IniWriteSection("test_list.ini", "itemlist", $listdata) EndSwitch WEnd
test_list.ini file(same directory as the test code noted above):
[itemlist] 1=1 2=2 3=3 4=4 5=5 6=6 7=7 8=8 9=9 10=10
Edited by xeroTechnologiesLLC, 12 April 2012 - 02:54 PM.






