soundztar
2012-05-12 21:36:29
Hello. I am looking to find a script where the mouse cursor follows the specific colour pixel. I have written a small piece of code in AutoIt, it works, but not as good as it should. Its for a flash game, where your cursor is supposed to follow a green spot for a specific amount of time. My goal is to reach maximum score.
My AutoIt Script, if it helps:
My AutoIt Script, if it helps:
#include <Misc.au3>
$dll = DllOpen("user32.dll")
Dim $coord[3]
While 1
If _IsPressed("1B", $dll) Then ExitLoop
For $i = 0 To 1920 Step 1
$coord = PixelSearch( 0, 0, $i, 1080, 0x789C58, 10 )
If Not @error Then
MouseMove($coord[0],$coord[1], 0 )
EndIf
If _IsPressed("1B", $dll) Then ExitLoop
Next
WEnd