hy leute, habe da mal ne frage!
Ich will das die While / Wend - Schleife wieder von neu ausgefürt wird (While $pixeln = 0x090E11) wenn bei While die bedingung nicht erfühlt wird, soll er erst Wend ausführen und dann wieder die Bedigung bei While überprüfen. hab schon einiges versucht, kann es sein das ich die falsche schleife genommen habe.
arbeite erst seit einigen wochen mit AutoIT
bitte um hilfe!
danke schon mal im vorraus.
Code
Global $COORD = 0
Global $PLACE = 0
HotKeySet("!s", "_START")
HotKeySet("!e", "_Ende")
While 1
Sleep(1)
WEnd
Func _START()
$pixeln = PixelGetColor (1038, 693)
While $pixeln = 0x090E11
$COORD_BONUSBOX = PixelSearch(226, 54, 1047, 705, 8675980, 8)
If Not @error Then
MouseClick("left", $COORD_BONUSBOX[0], $COORD_BONUSBOX[1], 1, 0)
Sleep(2200)
Else
If $PLACE = 0 Then
MouseClick("left", 894, 695, 1, 0)
EndIf
If $PLACE = 1 Then
MouseClick("left", 1019, 675, 1, 0)
EndIf
If $PLACE = 2 Then
MouseClick("left", 894, 666, 1, 0)
EndIf
If $PLACE = 3 Then
MouseClick("left", 1019, 655, 1, 0)
EndIf
If $PLACE = 4 Then
MouseClick("left", 894, 636, 1, 0)
EndIf
If $PLACE = 5 Then
MouseClick("left", 1019, 614, 1, 0)
EndIf
EndIf
$COORD_TRUEMMERHAUFEN = PixelSearch(229, 56, 1047, 700, 16510015, 8)
If Not @error Then
MouseClick("left", $COORD_TRUEMMERHAUFEN[0], $COORD_TRUEMMERHAUFEN[1], 1, 0)
Sleep(2200)
Else
If $PLACE = 0 Then
MouseClick("left", 894, 695, 1, 0)
EndIf
If $PLACE = 1 Then
MouseClick("left", 1019, 675, 1, 0)
EndIf
If $PLACE = 2 Then
MouseClick("left", 894, 666, 1, 0)
EndIf
If $PLACE = 3 Then
MouseClick("left", 1019, 655, 1, 0)
EndIf
If $PLACE = 4 Then
MouseClick("left", 894, 636, 1, 0)
EndIf
If $PLACE = 5 Then
MouseClick("left", 1019, 614, 1, 0)
EndIf
EndIf
If $PLACE = 0 Then
$COORD_FLYBOTTOM = PixelSearch(884, 685, 904, 705, 3648000, 8)
If Not @error Then
$PLACE = 1
EndIf
EndIf
If $PLACE = 1 Then
$COORD_FLYTOP = PixelSearch(1009, 665, 1029, 685, 3648000, 8)
If Not @error Then
$PLACE = 2
EndIf
EndIf
If $PLACE = 2 Then
$COORD_FLYTOP = PixelSearch(884, 656, 904, 676, 3648000, 8)
If Not @error Then
$PLACE = 3
EndIf
EndIf
If $PLACE = 3 Then
$COORD_FLYTOP = PixelSearch(1009, 645, 1029, 665, 3648000, 8)
If Not @error Then
$PLACE = 4
EndIf
EndIf
If $PLACE = 4 Then
$COORD_FLYTOP = PixelSearch(884, 626, 904, 646, 3648000, 8)
If Not @error Then
$PLACE = 5
EndIf
EndIf
If $PLACE = 5 Then
$COORD_FLYTOP = PixelSearch(1009, 604, 1029, 624, 3648000, 8)
If Not @error Then
$PLACE = 0
EndIf
EndIf
WEnd
MouseClick ("left", 1020, 689)
Sleep(2200)
EndFunc
Func _ENDE()
Exit
EndFunc
Alles anzeigen