About the screen coordinates

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
vvde
Posts: 4
Joined: 18 Sep 2018, 17:19

About the screen coordinates

18 Sep 2018, 17:35

Hello, i want to know if there's a way to find multiple screen coordinates. I mean, its easy to find a screen coordite with some programs or scripts but for the scripts that i need to find hundreds screen coordinates, it really takes long time to doing it one by one. I'm looking for a program or script that for example will save the coordinate to notepad or memory everytime i press a key or click.(Sorry for my bad english btw)
bordop
Posts: 10
Joined: 03 Jun 2018, 23:03
Contact:

Re: About the screen coordinates

18 Sep 2018, 17:59

This may help get you started:

Code: Select all

^LButton::
MouseGetPos, xx, yy
Return

RButton::
SendInput, (%xx%, %yy%)
Return
Be sure to set the coordmode you desire. I have done stuff like this in the past, makes it quite easy to get a lot of coordinates.
vvde
Posts: 4
Joined: 18 Sep 2018, 17:19

Re: About the screen coordinates

18 Sep 2018, 18:11

Thank you very much! It helped so much
vvde
Posts: 4
Joined: 18 Sep 2018, 17:19

Re: About the screen coordinates

18 Sep 2018, 19:01

It works well if desktop is on but if there's a window like notepad and if its not on fullscreen, when taking screencordinate, taking as notepad's borders. Like notepad is in center of screen, when the mouse is left up corner its going -x-y although it should be 0,0
Is there any way to fix it, like take the coordinate always as allscreen or it works like that?
scriptors
Posts: 227
Joined: 25 Feb 2016, 09:01

Re: About the screen coordinates

19 Sep 2018, 03:01

it depends on what you have to do next

yo must set CoordMode to screen and/or to active window, screen have it's coords and "active" window have it's ;)

for example, play with this:

Code: Select all

!^LButton::
CoordMode Pixel, Screen
CoordMode Mouse, Screen
MouseGetPos , OutputVarX, OutputVarY, OutputVarWin, OutputVarControl ; active window
WinGetTitle , title, ahk_id %OutputVarWin% ; name of active window
WinGetPos , X, Y, Wx, Wy, %title%
PixelGetColor , color, %OutputVarX%, %OutputVarY%, RGB
xx := Abs(X - OutputVarX)
yy := Abs(Y - OutputVarY)
MsgBox Coordinate: %OutputVarX% - %OutputVarY%`nTitolo: %title%`nColore: %color%`nControlClick: %xx% %yy%
CoordMode Pixel, Window
CoordMode Mouse, Window
Return
vvde
Posts: 4
Joined: 18 Sep 2018, 17:19

Re: About the screen coordinates

19 Sep 2018, 08:46

Thanks for all helps ^^ now its working like how i want

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: joefiesta, mikeyww and 263 guests