Bei mir geht folgendes:
Code
Func GetWp()
$pos1 = PixelSearch(100, 100, 800, 600, 0x & Hex(8947848,6))
$pos2 = PixelSearch(100, 100, 800, 600, 0x & Hex(1268909,6))
If Not @error Then
$x1 = $pos1[0]
$x2 = $pos2[0]
$y1 = $pos1[1]
$y2 = $pos2[1]
$x = $x1-$x2
$y = $y1-$y2
if (Abs($x)< 10) and (Abs($y)<10) Then
MouseMove ($x1,$y2)
EndIf
Else
MsgBox(0, "Nischt","Kein Bereich gefunden!")
EndIf
EndFunc
Alles anzeigen