23 lines
724 B
AutoIt
23 lines
724 B
AutoIt
Opt("WinTitleMatchMode", 2)
|
|
Global $f = FileOpen(@ScriptDir & "\count.txt", 2 + 8)
|
|
Run(@ScriptDir & "\test.exe")
|
|
Local $h = WinWait("PARAVIS FLASH", "", 15)
|
|
If $h = 0 Then
|
|
FileWriteLine($f, "FAIL: окно не появилось")
|
|
FileClose($f)
|
|
Exit 1
|
|
EndIf
|
|
Sleep(1200)
|
|
Local $cls = WinGetClassList($h)
|
|
Local $lines = StringSplit(StringStripWS($cls, 3), @LF, 2)
|
|
Local $btn = 0, $chk = 0, $lbl = 0
|
|
For $l In $lines
|
|
Local $c = StringStripWS($l, 3)
|
|
If $c = "Button" Then $btn += 1
|
|
If $c = "Static" Then $lbl += 1
|
|
Next
|
|
FileWriteLine($f, "Button: " & $btn)
|
|
FileWriteLine($f, "Static: " & $lbl)
|
|
FileWriteLine($f, "classes: " & StringReplace(StringStripWS($cls, 3), @LF, ","))
|
|
WinClose($h)
|
|
FileClose($f) |