Help to copy mouse coordinates Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
XtiiGmA
Posts: 26
Joined: 21 Apr 2021, 10:22

Help to copy mouse coordinates

29 Apr 2021, 12:15

Hi, how are you friends? Could you help me?
In this Script it shows me the X Y coordinates of the mouse in a window, but I would like to know how I can copy those coordinates into text.
for example, when pressing alt + c, it shows me the coordinates (this already works) and when pressing Ctrl + V, paste the coordinates into the notepad.

Code: Select all

CoordMode, Mouse

!c::
MouseGetPos, xpos, ypos 
Msgbox, , MOUSEPOSITION, The cursor esta en X%xpos% Y%ypos%, 10
Clipboard := X%xpos% Y%ypos%
return
braunbaer
Posts: 483
Joined: 22 Feb 2016, 10:49

Re: Help to copy mouse coordinates  Topic is solved

29 Apr 2021, 12:38

Are you sure you want to use ^v for this purpose. Normally, ^v pastes the clipboards content at the current cursor position.

Either

Code: Select all

Clipboard = X%xpos% Y%ypos%
Or

Code: Select all

Clipboard := "X" xpos " Y" ypos
The latter - command syntax - is recommended, the legacy syntax is there for compatibility with old scripts, it is not recommended for new scripts.
XtiiGmA
Posts: 26
Joined: 21 Apr 2021, 10:22

Re: Help to copy mouse coordinates

29 Apr 2021, 12:59

Thank you :D
braunbaer wrote:
29 Apr 2021, 12:38
Are you sure you want to use ^v for this purpose. Normally, ^v pastes the clipboards content at the current cursor position.

Either

Code: Select all

Clipboard = X%xpos% Y%ypos%
Or

Code: Select all

Clipboard := "X" xpos " Y" ypos
The latter - command syntax - is recommended, the legacy syntax is there for compatibility with old scripts, it is not recommended for new scripts.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Marium0505 and 346 guests