sollte ungetestet so funktionieren. koordinaten musste dir halt selber anpassen. farbcode muss dezimal oder hexadezimal eingegeben werden!

Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>


$Form1 = GUICreate("Form1", 188, 71, 192, 124)
$Input1 = GUICtrlCreateInput("", 10, 32, 69, 21)
$Label1 = GUICtrlCreateLabel("Farbe nach der gesucht werden soll:", 6, 8, 176, 17)
$Button1 = GUICtrlCreateButton("go", 94, 32, 75, 25, 0)
GUISetState(@SW_SHOW)

Global $farbe

HotKeySet("{esc}","exitit")
go()

func go()
While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		case $Button1
			$farbe = GUICtrlRead($Input1)
			start()
	EndSwitch
WEnd
endfunc

func start()
	if $farbe = "" Then
		msgbox(0,"","keine farbe eingegeben")
		go()
	EndIf
		sleep(5000)
	while 1
			$koords = PixelSearch(64, 55, 770, 487, $farbe)
		If Not @error Then
			MouseClick("left", $koords[0], $koords[1],1)
			sleep(50)
		endif
	wend
EndFunc

func exitit()
	Exit
EndFunc