Jump to content

ControlClick not working


Recommended Posts

Hi everyone,

I have a problem with ControlClick function. It doesn't work no matter how I tried all the possible combination of the parameters.

Below is the scripts of possible parameter combination:

;ControlClick("title","text","controlID ","button","clicks","x","y")
;title= Title, Class, Handle
;controlID= Class, ClassNN, Instance

;Title here is empty when I check it with AutoIt Info
ControlClick("", "", "[ScreenKeyboard::Button18]", "left", "1", "230","890")
ControlClick("", "", "[CLASS:ScreenKeyboard::Button; INSTANCE:18]", "left", "1", "230","890")
ControlClick("", "", "[INSTANCE:18]", "left", "1", "230","890")
;Title here is the Class of the window
ControlClick("[ScreenKeyboard::SKFrame]", "", "[ScreenKeyboard::Button18]", "left", "1", "230","890")
ControlClick("[ScreenKeyboard::SKFrame]", "", "[CLASS:ScreenKeyboard::Button; INSTANCE:18]", "left", "1", "230","890")
ControlClick("[ScreenKeyboard::SKFrame]", "", "[INSTANCE:18]", "left", "1", "230","890")
;Title here is the Handle of the window
ControlClick("[0x000907A0]", "", "[ScreenKeyboard::Button18]", "left", "1", "230","890")
ControlClick("[0x000907A0]", "", "[CLASS:ScreenKeyboard::Button; INSTANCE:18]", "left", "1", "230","890")
ControlClick("[0x000907A0]", "", "[INSTANCE:18]", "left", "1", "230","890")

Am I coding it correctly?

Thanks

Link to comment
Share on other sites

  • Developers

Ah, one of those: I am not going to share all info but still need help?
Have you tried the exact information returned by au3info in both the Title and the Control field?
Other than that you are on your own here.. ;)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Quote

Have you tried the exact information returned by au3info in both the Title and the Control field?

Yes.. I just omit some sensitive information in the script I've posted.

Quote

Ah, one of those: I am not going to share all info but still need help?

Yup, but in the meantime I'm using the MouseClick function as alternative but still prefer the ControlClick.

 

Thanks

Link to comment
Share on other sites

  • 4 years later...

I am having the same issue with no success, mouse click doesn't work for me as well.  I write program loaders for production equipment so all are different.  I have never seen an application like this one.  All handles were seen in the Info viewer.  Thought it would be an easy one.  Found that I have many child and sibling windows that shouldn't be linked to my button but I had to find a few invisible window handles to get to the handle I need.  It is the correct handle as I can Activate the button and it is highlighted in blue.  A simple spacebar or Enter click will open the next box but have tried everything I know of to click the button, even coordinates.  I have tried referencing every window's handle and still no luck.  Same as poster above, I can get ControlClick to work only by using the ClassNN returns 1 while Class with Instance returns 0.  Still no click on the application.

 

Here is the strange part, if I run a loop searching for all buttons on main window, it shows no buttons at all but the Info tools tells me this is the mother window.  Spy++ tells me there are other windows below that one before mine.  I can access the handles for all windows but when I run a loop looking for buttons, no button handles appear.  Do a call to get the window and I get the control handle to the button.  About to send a message to the operator and tell them to hit the spacebar.  Argghhhh.

WindowsForms10.Button......

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...