Sign in to follow this  
Followers 0
ckelsoe

MouseClick coordinates

4 posts in this topic

Hi all,

I am migrating some scripts from AutoHotKey to AutoIT. In AHK the mouse coordinates are specific to the active window. In AutoIt the coordinates seems to be based on the screen and not the window. I am unable to find a way to duplicate the behavior of the AHK MouseClick which is based on the active window and not the screen. I found in the AutoIt Window Info app how to change the basis of the coordinates to Window via the Coord Mode option. How do I get that to apply to MouseClick in code?

Thanks

Share this post


Link to post
Share on other sites



See help file: AutoItSetOption
 

Opt("CaretCoordMode", 1) ;1=absolute, 0=relative, 2=client
1 person likes this

edited

Share this post


Link to post
Share on other sites

As a side note I looked into using the ControlClick function. However the web page controls does not have an ID, name, etc. I do see the X / Y of the control. So I am back to using the X,Y values which so far seem to be based on the screen and not the active window for the MouseClick.

Share this post


Link to post
Share on other sites

Thanks E1M1 - I had not found that function yet. 

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