Hi Leute,
bin zur Zeit am Schreiben eines Scripts, bei dem ich mit ImageSearch arbeite. Allerdings will es nicht ganz so hinhauen. Aus irgendeinem Grund, will er den Else-Befehl nicht ausführen. Kann mir jemand sagen, woran das liegt? schonmal danke im voraus.
[spoiler]
[autoit]
#RequireAdmin
#include <ImageSearch.au3>
Global $fenster
Global $active = 0
HotKeySet ("{PGUP}","starten")
HotKeySet ("{PGDN}","beenden")
$x1=0
$x2=0
$x3=0
$y1=0
$y2=0
$y3=0
While 1
sleep(1)
WEnd
Func starten()
While 1
$result1 = _ImageSearch("x.png",1,$x1,$y1,125)
If $result1 = 1 Then
MouseClick ("LEFT",$x1,$y1)
sleep (500)
$result2 = _ImageSearch("xx.png",1,$x2,$y2,125)
If $result2 = 1 Then
MouseClick ("Left",$x2,$y2)
Else
If $result1 And $result2 = 0 Then
$result3 = _ImageSearch("xxx.png",1,$x3,$y3,125)
If $result3 = 1 Then
MouseClick ("LEFT",$x3,$y3)
EndIf
EndIf
EndIf
EndIf
WEnd
EndFunc
Func beenden()
Exit 1
EndFunc
[spoiler]