<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.atitd.org/wiki/t6w/index.php?action=history&amp;feed=atom&amp;title=User%3ACegaiel%2FMacros%2FGetMousePosition%2FCode</id>
	<title>User:Cegaiel/Macros/GetMousePosition/Code - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.atitd.org/wiki/t6w/index.php?action=history&amp;feed=atom&amp;title=User%3ACegaiel%2FMacros%2FGetMousePosition%2FCode"/>
	<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/GetMousePosition/Code&amp;action=history"/>
	<updated>2026-06-01T02:40:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/GetMousePosition/Code&amp;diff=148908&amp;oldid=prev</id>
		<title>Cegaiel: Created page with &quot;&lt;pre&gt; ;Author: Cegaiel ;Added: 10/25/2010 ;Last Update: 2/2/2012 - Increased speed to watch/display tooltip so that it shows steady instead of flashing.   MsgBox Move mouse aroun...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.atitd.org/wiki/t6w/index.php?title=User:Cegaiel/Macros/GetMousePosition/Code&amp;diff=148908&amp;oldid=prev"/>
		<updated>2012-02-03T03:41:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; ;Author: Cegaiel ;Added: 10/25/2010 ;Last Update: 2/2/2012 - Increased speed to watch/display tooltip so that it shows steady instead of flashing.   MsgBox Move mouse aroun...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
;Author: Cegaiel&lt;br /&gt;
;Added: 10/25/2010&lt;br /&gt;
;Last Update: 2/2/2012 - Increased speed to watch/display tooltip so that it shows steady instead of flashing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MsgBox Move mouse around screen for realtime information.`n`nPress the F2 key to copy the mouse position and color into Clipboard`n`nNote the color is RGB format!`nColor is useful if you want to use the PixelSearch function, in Autohotkey`n`nClick OK to continue...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#Persistent&lt;br /&gt;
SetTimer, WatchCursor, 1&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WatchCursor:&lt;br /&gt;
MouseGetPos, xpos, ypos &lt;br /&gt;
WinGetTitle, Title, A &lt;br /&gt;
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
PixelGetColor, color, xpos, ypos, RGB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GetKeyState, state, F2&lt;br /&gt;
if state = D&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
CenterX := Floor(Xmax/2)&lt;br /&gt;
CenterY := Floor(Ymax/2)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if xpos &amp;gt; CenterX&lt;br /&gt;
{&lt;br /&gt;
offsetX := CenterX - xpos&lt;br /&gt;
} else {&lt;br /&gt;
offsetX := xpos - CenterX&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ypos &amp;gt; CenterY&lt;br /&gt;
{&lt;br /&gt;
offsetY := CenterY - ypos&lt;br /&gt;
} else {&lt;br /&gt;
offsetY := ypos - CenterY&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Clipboard = Mouse Position: %xpos%`, %ypos%`n`nScreen Center: %CenterX%, %CenterY%`nMouse Position Offset: %offsetX%, %offsetY%`n`nColor: %color%`nActive Window: %Title%`nWindows Resolution: %A_ScreenWidth%x%A_ScreenHeight%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
MsgBox Mouse Position: %xpos%, %ypos%`n`nScreen Center: %CenterX%, %CenterY%`nMouse Position Offset: %offsetX%, %offsetY%`n`nColor: %color%`n`nThis information has been saved to the clipboard.`nPaste into Notepad with Ctrl+V at anytime.&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ToolTip, Mouse Position: %xpos%`, %ypos%`n`nColor: %color%`n`nActive Window: %Title%`n`nWindows Resolution: %A_ScreenWidth%x%A_ScreenHeight%`n`nAHK Windows Resolution: %XMax%x%YMax%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return&lt;br /&gt;
&lt;br /&gt;
^r::reload&lt;br /&gt;
^p::Pause&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cegaiel</name></author>
	</entry>
</feed>