#include #include #include #include #include Local $request = FileOpen("base.csv",$FO_READ),$ii=1,$aArray3[1]=["in"],$iii=1 ; Generate the array to populate dropdown Do Local $request2 = FileReadLine($request,$ii) Local $aArray2 = _StringExplode($request2, ',') If $aArray2[1] = "Convert" Then If _ArraySearch($aArray3,$aArray2[2]) = -1 Then _ArrayAdd($aArray3,$aArray2[2]) EndIf EndIf $ii = $ii+1; next row in data file Until $ii = 12 _ArrayDelete($aArray3,0) ; get the elements into a list $sList = "" For $i = 0 To UBound($aArray3) - 1 $sList &= "|" & $aArray3[$i] Next ; Create a GUI Opt("GUIOnEventMode", 1) $hGUI = GUICreate("Checker", 500, 500) ; Create the combo $hCombo = GUICtrlCreateCombo("", 20, 20, 200, 20) ; And fill it GUICtrlSetData($hCombo, $sList) $okbutton = GUICtrlCreateButton("Start", 230, 19, 60) GUICtrlSetOnEvent($okbutton, "goforit") $cancelbutton = GUICtrlCreateButton("Close", 430, 19, 60) ; ID 5 GUICtrlSetOnEvent($cancelbutton, "killit") GUISetState() Func goforit() While 1 $ba = GUICtrlRead($hCombo) Do Local $request2 = FileReadLine($request,$iii) Local $aArray2 = _StringExplode($request2, ',') _ArrayDisplay($aArray2) ;Get spend If $aArray2[1] = "Convert" And $aArray2[2] = $ba Then MsgBox(0,"The Result", "Result " & $aArray2[3]) EndIf $iii = $iii+1 Until $iii = 12 $iii=1 WEnd EndFunc FileClose($request) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func killit() Exit EndFunc