Jump to content

Help with finding coords


 Share

Recommended Posts

I wanna add finding coords to my program. So when someone presses F10 it will get the coords where they're mouse is and input them into my x,y input boxes that are called $x and $y. (I want it to automatically put it into the input boxes) I also only want it to find the coords relative to the game.

Thanks in advance,

~jack

Edited by jackyyll
Link to comment
Share on other sites

  • Moderators

Hmm, your nicer than I am today fastnick... I don't think I would of answered this one without at least seeing his effort first.

But it works good... try this, I just added a while and a msgbox so you can see it works good B)

Opt("MouseCoordMode", 2)
HotKeySet("{F9}", "FindCoord")

While 1
    Sleep(10)
WEnd

Func FindCoord()
$pos = MouseGetPos()
$x = $pos[0];I'm not sure about it.
$y = $pos[1];I'm not sure about it.
MsgBox(0, "", "X = " & $pos[0] & " Y = " & $pos[1])
EndFunc

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...