Jump to content
Sign in to follow this  

pixelsearch and movemouse - (Locked)

Recommended Posts

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])


Share this post

Link to post
Share on other sites

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
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...