jackyyll Posted November 6, 2005 Share Posted November 6, 2005 (edited) 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 November 6, 2005 by jackyyll Link to comment Share on other sites More sharing options...
fastnick1oo Posted November 6, 2005 Share Posted November 6, 2005 Try this: Opt("MouseCoordMode", 2) HotKeySet("{F9}", "FindCoord") Func FindCoord() $pos = MouseGetPos() $x = $pos[0];I'm not sure about it. $y = $pos[1];I'm not sure about it. EndFunc SciTE - much better than notepad. ; ] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 6, 2005 Moderators Share Posted November 6, 2005 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 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now