changtraingheo 0 Posted August 31, 2011 in the autoit, to make combox use this code: $input_second_mau = GUICtrlCreateCombo("item1",105,22,50) GUICtrlSetData($input_second_mau, "item2|item3", "item3") I try get value when select an item with code: MsgBox(0,"title","Value = " & GUICtrlRead($input_second_mau)) If i select item 3, i got value is "item3". It's get text not get value of combo box, if i change "item3" to "Help and Support" .. i got value is "Help and support" too, it's so hard compare, example: if GUICtrlRead($input_second_mau) == "Help and Support" .... ; it's not good In the html: <select onChange="alert(this.value)"> <option value="1">Item 1</option> <option value="2">Help and support</option> </select> when i select Help and Support, i got value is 2. I'm a newbie, i need help this problem. Thanks Share this post Link to post Share on other sites
hannes08 39 Posted August 31, 2011 (edited) Hi, you can do this with a little Switch ... EndSwitch: Switch GUICtrlRead($input_second_mau) Case "Item1" $value = 1 Case "Item2" $value = 2 Case "Item3" $value = 3 EndSwitch But I'm afraid, that autoit does not differ between value and description here. Edited August 31, 2011 by hannes08 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Share this post Link to post Share on other sites