Jump to content

ControlClick using handle


Gyba
 Share

Recommended Posts

Hello,

I have the below toolbar which has buttons that are not visible for the Window Info tool.

toolbar.png

So, in order to be able to click on those buttons, I searched the forum and found the below script which returns all controls for a given window.

Now that I know the data of the buttons I tried to use the below commands to click a button.  Without any success :( :

 

;Using the ClassNN
ControlClick($HDL, "", "[ClassNN:WindowsForms10.COMBOBOX.app.0.33c0d9d2]")
; Using the button handle
ControlClick($HDL, "", 0x001205E2)
; trying to go through the array and select the desired button
#include <Functions.au3>
#include <Array.au3>

$HDL = WinWait("GNB_L_Ro")
WinActivate($HDL)

$ControlList = _GetAllWindowsControls($HDL)

Sleep(1000)

ControlClick($HDL, "", $ControlList[37][2])


_ArrayDisplay($ControlList)

;_GetAllWindowsControls function is defined in Functions.au3 and contains the script from the above link. 

Any suggestions on how to click one of those buttons? Any help is more than appreciated.

Thank you!

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

×
×
  • Create New...