Jump to content

Other way to get coordinates


Recommended Posts

I was wondering if there was a script that could let me press "end" or something and give me the coordinates of wherever my mouse is (besides using your program since I can't use it for games and scroll bars).

Link to comment
Share on other sites

thanks all here my new code

HotKeySet("{END}", "End")

While 1
Sleep(1000)
WEnd

Func End()
$pos = MouseGetPos()
MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1])
EndFunc
Edited by Arez
Link to comment
Share on other sites

You can get spiffy and add a tooltip that follows your mouse.

HotKeySet("{END}", "End")

While 1
    $mousePos = MouseGetPos()
    $mouseTxt =  $mousePos[0] & "," & $mousePos[1]
    ToolTip($mouseTxt, $mousePos[0] + 5, $mousePos[1] + 5)
    Sleep(20)
WEnd

Func End()
    $mousexy = MouseGetPos()
    ClipPut($mousexy[0] & "," & $mousexy[1])
EndFunc
Link to comment
Share on other sites

  • 1 year later...

Hello,

I'm looking for the best way to get the current mouse position into the clipboard.

Is there a simple way to use a combination of ClipPut and MouseGetPos?

I'd like to just run a script whenever I need to get the absolute screen coordinates (not relative or anything like that for now).

Or perhaps, as in your example here, I could run a script that sort of just keeps running a while loop, and a hotkey to copy the current mouse position to the clipboard?

I supose I'm a little concerned about the while loop running on and on consuming CPU...maybe some sleeps in there...I don't know about that...just something I read somewhere.

The scripts in this thread seem to work well...

I'm just wondering if this is indeed still the best way to do it?

I want the simplest best way...tooltip is not necessary but is nice.

Thanks so much for any ideas about this.

frew

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...