mangler 0 Posted June 27, 2019 hey, working on a script to find a pixel color in game, and move to it Problem is, the mouse movement in game doesn't line up with the actual mouse position, and just ends up making my game spin and face the ceiling. I'm pretty sure i need to find a way to use relative mouse positioning, but i'm struggling to wrap my head around the best way to do it. any assistance is appreciated #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") Opt("MouseCoordMode", 2) While 1 While _IsPressed("10", $hDLL) $pos = MouseGetPos() $coord = PixelSearch(775,433,1221,784,0xFE4A4A) If Not @error Then MouseMove($coord[0], $coord[1]) EndIf WEnd WEnd Share this post Link to post Share on other sites
JLogan3o13 1,637 Posted June 28, 2019 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites