Дождаться появления окна. Нажать кнопку. Минимизировать окно.
Opt('WinTitleMatchMode', 3)
Opt('WinWaitDelay', 0)
Sleep(10)
$hWnd = WinWait('VSPE licensing')
If ($hWnd) Then
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:2]")
EndIf
Sleep(10)
$hWnd = WinWait('VSPE')
If ($hWnd) Then
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinSetState($hWnd, '', @SW_MINIMIZE)
EndIf
Opt('WinTitleMatchMode', 3)
Opt('WinWaitDelay', 0)
Sleep(10)
$hWnd = WinWait('VSPE licensing')
If ($hWnd) Then
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:2]")
EndIf
Sleep(10)
$hWnd = WinWait('VSPE')
If ($hWnd) Then
ControlClick($hWnd, "", "[CLASS:Button; INSTANCE:1]")
WinSetState($hWnd, '', @SW_MINIMIZE)
EndIf