The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:Cegaiel/Macros/GetMousePosition"

From A Tale in the Desert
Jump to navigationJump to search
(New page: <pre> MsgBox Move mouse around screen for realtime information.`n`n`nPress the F2 key to copy the mouse position and color into Clipboard`nYou can Paste into Notepad with Ctrl+V).`n`nNote ...)
 
Line 1: Line 1:
 
<pre>
 
<pre>
MsgBox Move mouse around screen for realtime information.`n`n`nPress the F2 key to copy the mouse position and color into Clipboard`nYou can Paste into Notepad with Ctrl+V).`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...
+
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...
  
  
Line 20: Line 20:
 
if state = D
 
if state = D
 
{
 
{
Clipboard = `;The below 2 lines are for information purposes only and can be erased.`n`;Current Color: %color%`n`;Mouse Position: %xpos%, %ypos%`n`n`;The below line only needs to be used once in a script, first line!`nWinGetActiveStats, Title, Width, Height, X, Y`n`n`;The next 3 lines is the required code, Width and Height variables is determined by the WinGetActiveStats line (above)`nClickX := Width - %ClickX%`nClickY := Height - %ClickY%`nClick, `%ClickX`%, `%ClickY`%
+
Clipboard = Mouse Position: %xpos%`, %ypos%`n`nColor: %color%`n`nActive Window: %Title%`n`nWindows Resolution: %A_ScreenWidth%x%A_ScreenHeight%
  
MsgBox Mouse Position %xpos%, %ypos% has been converted to:`n`nClickX := Width - %ClickX%`nClickY := Height - %ClickY%`nClick, `%ClickX`%, `%ClickY`%`n`nThe converted code is now in the clipboard.`nPaste into Notepad with Ctrl+V at anytime.  
+
 
 +
MsgBox Mouse Position: %xpos%, %ypos%`n`nColor: %color%`n`nThis information has been saved to the clipboard.`nPaste into Notepad with Ctrl+V at anytime.  
 
}
 
}
  

Revision as of 19:01, 14 January 2010

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



#Persistent
SetTimer, WatchCursor, 100
return


WatchCursor:
MouseGetPos, xpos, ypos 
WinGetTitle, Title, A 


PixelGetColor, color, xpos, ypos, RGB


GetKeyState, state, F2
if state = D
{
Clipboard = Mouse Position: %xpos%`, %ypos%`n`nColor: %color%`n`nActive Window: %Title%`n`nWindows Resolution: %A_ScreenWidth%x%A_ScreenHeight%


MsgBox Mouse Position: %xpos%, %ypos%`n`nColor: %color%`n`nThis information has been saved to the clipboard.`nPaste into Notepad with Ctrl+V at anytime. 
}

ToolTip, Mouse Position: %xpos%`, %ypos%`n`nColor: %color%`n`nActive Window: %Title%`n`nWindows Resolution: %A_ScreenWidth%x%A_ScreenHeight%
return