Цитата Vadikan:
5 секунд будет достаточно »
|
Вариант №2:
Код:
Opt("WinWaitDelay", 0)
$sTitle = "[CLASS:#32770;TITLE:Missing File]"
$sText = ""
While 1
_WinWaitVisible($sTitle, $sText, 5)
If Not _WinVisible($sTitle, $sText) Then Exit
ControlCommand($sTitle, $sText, "Button6", "Check")
Sleep(10)
ControlClick($sTitle, $sText, "Button2")
WEnd
Func _WinWaitVisible($sTitle, $sText, $iTime=0)
Local $iTimer = -1
If $iTime > 0 Then $iTimer = TimerInit()
While Not _WinVisible($sTitle, $sText)
Sleep(10)
If $iTime > 0 And (TimerDiff($iTimer) / 1000) >= $iTime Then ExitLoop
WEnd
Return _WinVisible($sTitle, $sText)
EndFunc
Func _WinVisible($sTitle, $sText="")
Return Number(BitAND(WinGetState($sTitle, $sText), 2) = 2)
EndFunc