Sign in to follow this  
Followers 0
ganon64

pixel detection relative to window size

4 posts in this topic

#1 ·  Posted (edited)

Hi, is there a way to pixel detect and move the mouse to coordinates relative to the window size so that a script may work on all resolutions without manually changing all the coordinates for every resolution :/

If not maybe some sneaky formula to find coords from one resolution to another, save me adding coordinates for each one :)

Edited by ganon64

Share this post


Link to post
Share on other sites



Hi, is there a way to pixel detect and move the mouse to coordinates relative to the window size so that a script may work on all resolutions without manually changing all the coordinates for every resolution :/

Maybe you need to look up

@DesktopWidth and @DesktopHeight


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

right so they'd be used in calculations for coordinates i guess hmm i see hmm just found a better way using wingetpos :) should work

Share this post


Link to post
Share on other sites

hmm help it didn't work :) kk i programmed it using wingetpos and it worked but only in the one resolution i alrdy made it in(1024x768) and not in other resolutions :/ i did it like this:

Dim $size = WinGetPos("SRO_Client")

PixelGetColor(705*$size[2]/1024,380*$size[3]/768) = 9862483

where i found the ratio of the cordinates in 1024x768 and multiplied them by the screen size (hence resolution) however it seems this is not how it works when u change the resolution of a screen it doesn't stretch proportionally like i thought, any ideas?

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