MuffettsMan Posted July 28, 2008 Share Posted July 28, 2008 (edited) I noticed when testing a script thats using MouseGetPos() - when a World of Warcraft game window has focus... it fails to return the correct cordinates always instead the exact / dead center of the screen example: #include <Misc.au3> Opt("MouseCoordMode", 0) ;1=absolute, 0=relative, 2=client $dll = DllOpen("user32.dll") While 1 If _IsPressed("01") Then ; Left Mouse Click While _IsPressed("01") ; do nothing WEnd $pos = MouseGetPos() $Xcord = $pos[0] $Ycord = $pos[1] ToolTip("Left " & $Xcord & " " & $Ycord) EndIf WEnd if i click anywhere else the tooltip gives me the cords where i clicked... once the warcraft window has focus however it fails to give correct cordinates... tried all available Opt("MouseCoordMode", 0) options but still the same result... Is the game somehow blocking autoit from detecting the correct coordinates? I found it odd as i have used PixelSearch in the same setup to get exact cordinates all the time... this is just the first time i'm trying to obtain the cordinates of where the mouse was clicked >.< EDIT: I assume it is something blocking from the game itself as when i'm on the login screen... or any other screen (ie msgbox) beyond the general area of the game itself i do get correct cords anyone found a workaround? EDIT2: Well after tinkering some more I found that If i take out the While _IsPressed("01") do nothing bit it does give the right cordinates.... just floods those cordinates over and over again as well >.< i guess I could add a sleep statement in hopes to record the cord only once... but that would hardly work on a mouse down (and held down) type of click Edited July 28, 2008 by zhenyalix Don't let that status fool you, I am no advanced memeber! Link to comment Share on other sites More sharing options...
NeilApp Posted July 28, 2008 Share Posted July 28, 2008 Try enabling "use hardware cursor" in the interface options menu. 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