-2
in Schleife
ich Probleme mit dem folgenden Code habe. Ich versuche, die Schleife Kaution zu haben und zu einem Setup() Funktion gehen, wenn Sie die TAB-Taste gedrückt wird. Wenn ich jedoch TAB drücke, passiert nichts, es geht einfach weiter, bitte helfen!AutoIt _IsPressed woking nicht
While -1
While -1
WinActivate($PID)
Sleep(1000)
Send("Hello")
$timer = TimerInit()
While -1
PixelSearch($searchL,$searchT,$searchR,$searchB,"0x" & Hex($color,6),10,1)
---> If _IsPressed("09",$dll) Then ExitLoop 3 ;HERE IS THE CODE THAT IS NOT WORKING
If @error <> 1 Then ExitLoop
If TimerDiff($timer) > 1000 Then
Sleep(1000)
WinActivate($PID)
ExitLoop 2
EndIf
Wend
$timer = TimerInit()
MouseMove($shade[0], $shade[1])
While -1
PixelSearch($shade[0]-10,$shade[1]-10,$shade[0]+10,$shade[1]+10,"0x" & Hex($color,6),10,1)
---> If _IsPressed("09",$dll) Then ExitLoop 3 ;HERE IS THE CODE THAT IS NOT WORKING
If @error = 1 Then ExitLoop
If TimerDiff($timer) > 5000 Then
Sleep(1000)
WinActivate($PID)
Exitloop 2
EndIf
Wend
Wend
Wend
Setup()
EndFunc
Können Sie [MCVE] (http://stackoverflow.com/help/mcve) bereitstellen? –