#include <Misc.au3>
#include <WinAPI.au3>
#RequireAdmin
Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)
Global $dll = DllOpen("user32.dll")
HotKeySet("{F1}","start")
while 1
Sleep(500)
WEnd
func start()
MsgBox(0,"","")
$color = 0x000000
While 1
$pos = MouseGetPos()
$pixel = PixelSearch(($pos[0] - 50) , ($pos[1] - 50) , ($pos[0] + 50) , ($pos[1] + 50),$color)
if IsArray($pixel) = True Then
if _IsPressed("02",$dll) Then
MouseMove($pixel[0],$pixel[1])
EndIf
EndIf
if _IsPressed("1B",$dll) Then
Exit
EndIf
WEnd
EndFunc