Jump to content
Sign in to follow this  
giorget

How tro read combobox control

Recommended Posts

giorget

Hi all,

Maybe somone could help me...

I need to read the value of a combobox control as text. does it's possible with autoit ?

imagine a combobox with 3 choose possibilities.

a) choose1

:D choose2

c) choose3

these value are dinamically generated, what i need is a string with "choose1,choose2,choose3".

thanks!

G.

Share this post


Link to post
Share on other sites
bmouth

ControlCommand()

_GUICtrlComboBox_xxx()

Can you be more specific? Which command could be used with ControlCommand() to get the complete list from a ComboBox?

I have a similar problem where I need to get the list from a combobox in an external application.

Share this post


Link to post
Share on other sites
MikeP

#include <GUIConstants.au3>
Opt("GUIOnEventMode", 1)

GUICreate("My GUI combo", 200, 50)  

$idCombo = GUICtrlCreateCombo ("item1", 10,10,150) 
GUICtrlSetData(-1,"item2|item3","item3") 
GUISetState ()
GUICtrlSetOnEvent($idCombo,"popup")
GUISetOnEvent($GUI_EVENT_CLOSE, "quit")

While 1
  Sleep(100)
Wend
   
Func popup()
    Sleep(1000)
    MsgBox(0,"", GUICtrlRead($idCombo)&" is selected")
EndFunc 

Func quit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
Zedna

Can you be more specific? Which command could be used with ControlCommand() to get the complete list from a ComboBox?

I have a similar problem where I need to get the list from a combobox in an external application.

Just open AutoIt helpfile and look at these functions. There are detailed descriptions also with nice examples.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×