Sign in to follow this  
Followers 0
Arez

Other way to get coordinates

8 posts in this topic

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).

Share this post


Link to post
Share on other sites



HotKeySet and MouseGetPos will serve your purposes.

Share this post


Link to post
Share on other sites

I try to make my code but it says no

help

HotKeySet ( {END} [, "MouseGetPos()"] )

$pos = MouseGetPos()

MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1])

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

hahaha thats funny

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0