donhorn20 0 Posted March 24, 2020 Trying to get this combo box drop down to read the data within my ini section names. Not able to return the key=value data when I hit the button on the gui. I can't seem to get the IniReadSection to recognize anything based off of my selection. What am I missing here? #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #Region ### START Koda GUI section ### Form= ; original script borrowed from InunoTaishou and Subz $Form1 = GUICreate("Sample", 413, 213, 192, 124) $Combo1 = GUICtrlCreateCombo("", 80, 24, 241, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $Button1 = GUICtrlCreateButton("Submit", 152, 56, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ; Get the sections of the ini file Global $iFile = @ScriptDir & "\test5.ini" Global $aSections = IniReadSectionNames($iFile) ; If the IniReadSectionNames succeeded, convert the array to a string with each item separated by a | (pipe) and set the default selected item to $aSections[1] If (Not @Error) Then GUICtrlSetData($Combo1, _ArraytoString($aSections, "|", 1), $aSections[1]) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $test = IniReadSection($iFile, $aSections) MsgBox($MB_SYSTEMMODAL, "", $test) EndSwitch WEnd I've attached my sample ini data too. test5.ini Share this post Link to post Share on other sites
Nine 993 Posted March 24, 2020 Replace that line $test = IniReadSection($iFile, $aSections) by $test = _ArrayToString(IniReadSection($iFile, guictrlread ($Combo1)),"=",1) Not much of a signature but working on it... Spoiler Block all input without UAC Save/Retrieve Images to/from Text Tool to search content in au3 files Date Range Picker Sudoku Game 2020 Overlapped Named Pipe IPC x64 Bitwise Operations Multi-keyboards HotKeySet Fast and simple WCD IPC GIF Animation (cached) Share this post Link to post Share on other sites
donhorn20 0 Posted March 25, 2020 Thanks @Nine, that did the trick. Share this post Link to post Share on other sites