Why Can't I get the selected string in a combo box?!?

Recommended Posts

Silverlode 0

Silverlode 0

I've tried ControlCommand, _GuiCtrlComboBox_GetCurrentSel, and am now trying GuiCtrlRead. All return the same thing, "0". I have a combo box With a list of time periods and I want to make sure the correct one is selected.

Share this post

Link to post

Share on other sites

BrewManNH 1,099

BrewManNH 1,099

GUICtrlRead will only work with AutoIt controls. _GUICtrlComboBox_GetCurSel only retrieves the selected index, and not the text. _GUICtrlComboBox_GetEditText might get the information you need though.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.