Arez Posted July 15, 2007 Share Posted July 15, 2007 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 More sharing options...
Richard Robertson Posted July 15, 2007 Share Posted July 15, 2007 HotKeySet and MouseGetPos will serve your purposes. Link to comment Share on other sites More sharing options...
Arez Posted July 15, 2007 Author Share Posted July 15, 2007 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]) Link to comment Share on other sites More sharing options...
gamepin126 Posted July 15, 2007 Share Posted July 15, 2007 HotKeySet("{END}", "End") While 1 Sleep(1000) WEnd Func End() $mousexy = MouseGetPos() ClipPut($mousexy[0] & "," & $mousexy[1]) EndFunc Link to comment Share on other sites More sharing options...
Arez Posted July 15, 2007 Author Share Posted July 15, 2007 (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 July 15, 2007 by Arez Link to comment Share on other sites More sharing options...
gamepin126 Posted July 15, 2007 Share Posted July 15, 2007 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 More sharing options...
Arez Posted July 15, 2007 Author Share Posted July 15, 2007 hahaha thats funny Link to comment Share on other sites More sharing options...
frew Posted March 23, 2009 Share Posted March 23, 2009 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now