Jump to content

ControlClick() not working when trying to click on a tab... but MouseClick() works


Recommended Posts

Hello,

I am fairly new to Auto IT however, I ran into an issue when trying to ControlClick() on a tab in this one program. I was able to get the window handle and activate it and then I was able to get the control handle of the tab menu. But when I use ControlClick() with the two handles and with the ControlClick coords, it does not work. I tested MouseClick() and that works but I don't like using MouseClick() since it isn't as reliable as ControlClick().

Here is my code:

image.thumb.png.760c21409491db4f47629d16bc31ce32.png

The window appears and is maximized perfectly fine, and when I get the $tabs handle I get the correct handle for the tab menu (checking it via the console output). The problem is the control click (I put 5 clicks just to test what would happen but nothing happened). Anyway, the MouseClick above it that is commented out works, but I want to find out why the ControlClick does not work.

Hopefully there is a solution.

Thanks

Link to post
Share on other sites

When you post code, please use tags as described in the link.

Your issue may come from the fact that MouseClick defaults to absolute screen coordinates, whereas ControlClick uses control coordinates.

Link to post
Share on other sites
  • 1 month later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...