Hi guys, I am a fairly new poster and is probably over thinking this. I have 4 arrays, 3 input box and and 1 combo box. The first array is read into the list of the combo box. When the first item in combo box 1 is selected, each of the 3 text box is populated accordingly with the value from index 1 of the different arrays. When the second item in the combo box is selected, it will populate the text boxes with index 2 of the arrays. My question is, how can I do this without hardcoding in the array index number? I have thought about setting a variable to "indexof" array but I was not able to find such thing on autoit. Case $combo_box
if GUICtrlRead($combo_box) = $array1[0] Then
GUICtrlSetData($inputbox1,$array2[0])
GUICtrlSetData($inputbox2,$array3[0])
GUICtrlSetData($inputbox3,$array4[0])
ElseIf GUICtrlRead($combo_box) = $array1[1] Then
GUICtrlSetData($inputbox1,$array2[1])
GUICtrlSetData($inputbox2,$array3[1])
GUICtrlSetData($inputbox3,$array4[1])
Else
GUICtrlSetData($inputbox1,$array2[2])
GUICtrlSetData($inputbox2,$array3[2])
GUICtrlSetData($inputbox3,$array4[2])
EndIf