Sign in to follow this  
Followers 0
coderrr

Convert Pixel Coordinates to Mouse Coordinates

7 posts in this topic

I wrote a script that finds the coordinates of a pixel to click, but I found that the coordinates of the mouse pointer are different. Ho can i click on the coordinates that i found?

Sorry if I made grammar mistakes.

Share this post


Link to post
Share on other sites



For example my resolution is 1920x1080, but if If use MouseGetPos() to obtain the coordinates of the bottom right corner i get 1535, 863.

Share this post


Link to post
Share on other sites

Read about

Opt("MouseCoordMode", 1) ;1=absolute, 0=relative, 2=client
Opt("PixelCoordMode", 1) ;1=absolute, 0=relative, 2=client

and

Quote

MouseGetPos

Remarks

See MouseCoordMode for relative/absolute position settings. If relative positioning, numbers may be negative.

 

Share this post


Link to post
Share on other sites

I already tried that but it unfortunatly doesn't solve the problem

Share this post


Link to post
Share on other sites

Coordinates seem to be scaled by a factor of about 1,25.

How can I edit a previous post?

Share this post


Link to post
Share on other sites

Ok, sorry for the triple post.

The problem was caused by Windows 10 Display Scaling, which was set to 100% instead of 150%.

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