Sign in to follow this  
Followers 0
Guest alicegao

MouseClick using absolute x, y coordinates

3 posts in this topic

Hi,

I have a question regarding the MouseClick method.

When I was using AutoIt 2.6.1, the LeftClick method was using X and Y

coordinates that are relatively to the current active window, which was very

convenient because the position of the window doesn't matter.

However, when I tried to upgrade my script to AutoItv3, I found that

MouseClick is using the absolute X and Y coordinates relatively to the entire

screen. Personally, I think this is inconvenient and it causes the script

to have more hard-coded values. The reason is that when a new window

is opened, the script has to move and resize the window to make sure it is

at a specified position so that the X and Y coordinates of the buttons on the

window remain the same.

I am just wondering if there is any specific reason for changing the

X and Y coordinates from relative to the window to absolute. Also, when

I tried to use the ControlClick, it looked like that the right button is clicked,

but I didn't get to see the cursor moving to the button and click it. I wonder

if this is how it should work?

Many Thanks

Alice

Share this post


Link to post
Share on other sites

You can control the origin of screen coordinates. See the AutoItSetOption function in the help file, and look for the MouseCoordMode option.

I do not know about ControlClick.


Phillip

Share this post


Link to post
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
Sign in to follow this  
Followers 0