Jump to content

comboBox problems


Davide
 Share

Recommended Posts

Hi all.

I am trying to get a list of items from a comboBox. All the time I tried I eneded up having an empty list

$controlNN = "WindowsForms10.COMBOBOX.app.0.378734a1" ; the combo box with list of payment types

$hlist = ControlGetHandle( $appWinTitle, "", $controlNN )

$controlID = _GetDlgCtrlID($hlist)

$comboList = _GUICtrlComboGetList ($controlID)

Func _GetDlgCtrlID($hwnd)

; get controlID of a control

local $ID = DllCall('user32.dll', 'int', 'GetDlgCtrlID', 'hwnd', $hwnd)

if IsArray ($ID) Then Return $ID[0]

Return 0

EndFunc ; ==>GetDlgCtrlID

I got the $controlNN from AutoIt Window Info tool. It seems that autoit is unable to deal with this comboBox :P

Any suggestion ?

Link to comment
Share on other sites

Hi all.

I am trying to get a list of items from a comboBox. All the time I tried I eneded up having an empty list

$controlNN = "WindowsForms10.COMBOBOX.app.0.378734a1" ; the combo box with list of payment types

$hlist = ControlGetHandle( $appWinTitle, "", $controlNN )

$controlID = _GetDlgCtrlID($hlist)

$comboList = _GUICtrlComboGetList ($controlID)

Func _GetDlgCtrlID($hwnd)

; get controlID of a control

local $ID = DllCall('user32.dll', 'int', 'GetDlgCtrlID', 'hwnd', $hwnd)

if IsArray ($ID) Then Return $ID[0]

Return 0

EndFunc ; ==>GetDlgCtrlID

I got the $controlNN from AutoIt Window Info tool. It seems that autoit is unable to deal with this comboBox ;)

Any suggestion ?

All those gyrations to get the control ID are unnecessary. The _GUICtrlComboBox_GetList() function in the current Beta takes the control handle. That should work more reliably with less code.

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...