Jump to content


Photo

Easy way to detect Coords


  • Please log in to reply
2 replies to this topic

#1 Gheotic

Gheotic
  • Members
  • 37 posts

Posted 20 June 2012 - 10:17 AM

Coords Detection
I always hated to find out what coord i need for my scripts, so i wrote this script to help me
The script have a instantly updating tooltip near the mouse, that tells the coords at the mouse's position. When you have found the coords you needed you just press Ctrl + right mouse button, then it puts it into your clipboard, so you can easily can use it for your script.

Hotkeys
Ctrl + LeftMousebutton = Start/Stop Script
Ctrl + RightMousebutton = Copy the coords to clipboard
Ctrl + shift + R = Resets/Reload Script

;***********************Get Cords***************************
+^R::Reload      ;Reloads Script
+^P::Pause       ;Pauses  Script
Ins:: Suspend    ;Suspend hotkeys

;Ctrl+Leftmousebutton  = Start stop Coord Detection
;Ctrl+RightMousebutton = Copy currently coords to clipboard 
;***********************************************************



coordmode, tooltip, screen
#maxthreadsperhotkey 2

toggle = 0

^LButton::
    Toggle := !Toggle
     While Toggle{
MouseGetPos, Xpos, Ypos 
Sleep, 01

Sleep, 01
ToolTip, X%Xpos% Y%Ypos%, %1Xpos%, %Y1pos%
}
RemoveToolTip:
SetTimer, RemoveToolTip, Off
ToolTip
return

^RButton::
if (Xpos=asdas) ;random number
{
SplashTextOn,38, Coord Error, No coords found
WinMove, Coord Error,, 0, 0
Sleep, 2000
SplashtextOff
}
else
{
Clipboard = %Xpos%,%Ypos%
SplashTextOn,38, Coords, Coords Copied to Clipboard %Xpos%,%Ypos%
WinMove, Cords,, 0, 0
Sleep, 2000
SplashtextOff
Return
}
If you have any suggestions please leave a comment or pm me =)

See also my Color detection script http://www.autohotke...php?f=2&t=87746

[Mod]

#2 peterm

peterm
  • Members
  • 59 posts

Posted 26 June 2012 - 07:14 AM

Nice, I like these easy ways of extracting screen info.
Two typos. The [ should not be in the splashtext line. Seems to be straight out of the help file.

Thanks

#3 gwarble

gwarble
  • Members
  • 508 posts

Posted 26 June 2012 - 08:15 PM

Nice work...

"Coords" would make more sense