 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
playfullscientist
Joined: 20 Apr 2005 Posts: 22 Location: Princeton NJ USA
|
Posted: Wed Apr 20, 2005 9:37 pm Post subject: mouse position |
|
|
Hi...I tried this program to get the position of the mouse on the screen. But I only get the position of the mouse inside the OK button in the MsgBox. How do I get the position of the mouse anywhere on the screen? Thanks. Playfullscientist
#x::
Run,www.google.com
Loop
{
MouseGetPos,xpos,ypos,google
SetTimer,WatchCursor,100
MsgBox,4096,X%xpos%,Y%ypos%,zzz,zzz
}
return
WatchCursor:
MouseGetPos, , , id, control
return _________________ I am a playful scientist |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5390 Location: /b/
|
Posted: Wed Apr 20, 2005 9:52 pm Post subject: |
|
|
Hmm, capturing mouse coords relative to the whole screen? CoordMode?: | Code: | #Persistent
CoordMode, Mouse, Screen
SetTimer, WatchMouse
WatchMouse:
MouseGetPos, varX, varY
MsgBox, X: %varX%`nY: %varY% |
_________________
 |
|
| Back to top |
|
 |
Invalid User
Joined: 14 Feb 2005 Posts: 442 Location: Texas, Usa
|
|
| Back to top |
|
 |
Wingfat
Joined: 23 Aug 2004 Posts: 193 Location: East Bay, California USA
|
Posted: Wed Apr 20, 2005 10:34 pm Post subject: |
|
|
| Code: |
MouseGetPos, xpos, ypos
; Msgbox, The cursor is at X%xpos% Y%ypos%.
; Msgbox not needed so it is commented out.
; This example allows you to move the mouse around to see
; the mouse pos:
#Persistent
SetTimer, WatchCursor, 100
return
WatchCursor:
MouseGetPos, xpos, ypos,
ToolTip, x%xpos% Y%ypos%
return
|
This will show on the tool tip menu where your mouse is, so you dont need a msg box. you can remove the comment infront of the msg box to add it back in. _________________ ----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
----------------------------- |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|