Сделал скрипт регистрации Promt в автоматическом режиме.
Не пойму почему иногда скрипт отрабатывает правильно, а иногда застревает в окнах и дальнейшую процедуру приходится уже делать ручками. Заранее благодарю.
Код:
#NoTrayIcon
$Title1 = "Promt Professional 9 Patch"
$Title2 = "Регистрация"
$Title3 = "Активация"
$exe='Crack-FFF.exe'
Run (@ScriptDir&'\'&$exe)
WinWait($Title1, "", 10)
If WinExists($Title1) Then
BlockInput(1)
ControlClick($Title1, "", "Button1")
BlockInput(0)
EndIf
WinWait($Title2, "", 10)
If WinExists($Title2) Then
BlockInput(1)
ControlClick($Title2, "", "Button1")
BlockInput(0)
EndIf
WinWait($Title2, "Продукт успешно зарегистрирован.", 10)
If WinExists($Title2) Then
BlockInput(1)
ControlClick($Title2, "", "Button1")
BlockInput(0)
EndIf
WinWait($Title2, "", 10)
If WinExists($Title2) Then
BlockInput(1)
ControlClick($Title2, "", "Button1")
BlockInput(0)
EndIf
WinWait($Title3, "", 10)
If WinExists($Title3) Then
BlockInput(1)
ControlClick($Title3, "", "Button2")
BlockInput(0)
EndIf
WinWait($Title3, "", 10)
If WinExists($Title3) Then
BlockInput(1)
ControlClick($Title3, "", "Button2")
ControlClick($Title3, "", "Button4")
BlockInput(0)
EndIf
WinWait($Title3, "", 10)
If WinExists($Title3) Then
BlockInput(1)
ControlClick($Title3, "", "Button7")
BlockInput(0)
EndIf
WinWait($Title3, "Продукт успешно активирован.", 10)
If WinExists($Title3) Then
BlockInput(1)
ControlClick($Title3, "", "Button1")
BlockInput(0)
EndIf
WinWait($Title2, "", 10)
If WinExists($Title2) Then
BlockInput(1)
WinClose($Title2)
BlockInput(0)
EndIf
If WinExists($Title1) Then
BlockInput(1)
WinClose($Title1)
BlockInput(0)
EndIf
Не пойму почему иногда скрипт отрабатывает правильно, а иногда застревает в окнах и дальнейшую процедуру приходится уже делать ручками. Заранее благодарю.