I start to use AHK's GetMousePos function, but not for a window but for the screen.
However, instead of working with pixels I would like to work with other values,
because The Logitech Gaming Software doesn't work with pixels.
It works with values from 0 to 65535 (both on X and Y axis.)
Since my monitor's resolution is 1920x1080, I multiply the X pixels with 34,15 and the Y pixels with 60,736 (haven't found out the value yet - 60,68 is wrong).
This is my first code, which looked ok on the first view, but it's not correct:
Code: Select all
^+F2::
CoordMode, Mouse, Screen
MouseGetPos, xx, yy
lx := (xx * 34,15)
ly := (yy * 60,736)
mx := Round(lx)
my := Round(ly)
send %mx%, %my%
return
My aim is to receive natural values, which get round up if it's ,50.
Example:
102,45 = 102
136,60 = 137
170,75 = 171
X Pixel X Logitech value
0 0
1 34
2 68
3 102
4 137 - My result is 136, which is wrong
Thanks for any help!