14 lines
482 B
AutoIt
14 lines
482 B
AutoIt
Opt("WinTitleMatchMode", 2)
|
|
Local $log = "C:\PF\USBInstaller\test\last-error.txt"
|
|
Local $h = WinWait("AutoIt Error", "", 5)
|
|
Local $f = FileOpen($log, 2 + 8)
|
|
If $h = 0 Then
|
|
FileWriteLine($f, "окна ошибки нет")
|
|
Else
|
|
FileWriteLine($f, "=== ТЕКСТ ОШИБКИ ===")
|
|
FileWriteLine($f, WinGetText($h))
|
|
ControlClick($h, "", "[CLASS:Button; INSTANCE:1]")
|
|
Sleep(500)
|
|
FileWriteLine($f, "закрыто: " & (WinExists($h) = 0))
|
|
EndIf
|
|
FileClose($f) |