Jump to content

How tro read combobox control


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

#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

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...