Page 1 of 1

How to find left-side-center click coordinates of any screen automatically?

Posted: 20 Feb 2018, 08:50
by carno
I would like to find the click coordinates for the left-side-center (left edge center) of any screen (regardless of the screen size) automatically through a script so that I can use those numbers in Click x, y. Currently, I can find x and y mnaually using AutoScriptWriter or AutoIt3 Window Spy. PS: Doing this manually, coordinates for the upper left corner seems to be always: 0, 0. So if I can find the coordinates for the lower left corner (0, y) then I can find the left center (0,y/2).

Re: How to find left-side-center click coordinates of any screen automatically?  Topic is solved

Posted: 20 Feb 2018, 09:36
by evilC
x is 0
y is A_ScreenHeight / 2

MouseMove, 0, % A_ScreenHeight / 2

Re: How to find left-side-center click coordinates of any screen automatically?

Posted: 20 Feb 2018, 09:41
by Exaskryz
See also SysGet, MonitorWorkArea in case you need to account for the taskbar height.

Re: How to find left-side-center click coordinates of any screen automatically?

Posted: 20 Feb 2018, 10:15
by carno
Thanks very much for all your help! AHK is so powerful. :shock: