Код:
Run("downloader.exe")
#Include <WinAPIEx.au3>
Local $sProcName = "downloader.exe", $iPid, $aWins
$iPid = ProcessExists( $sProcName )
If $iPid Then
$aWins = _WinAPI_EnumProcessWindows( $iPid )
If Not @Error Then
For $Idx = 1 To $aWins[0][0] Step 1
ConsoleWrite( WinGetTitle( $aWins[$Idx][0] ) & @LF )
Next
EndIf
EndIf
For $i 1 To 10 step 1
sleep(1)
$fVisible = ControlCommand ( aWins, "text", controlID, "IsVisible" )
ConsoleWrite( "$fVisible=" & $fVisible )
if $fVisible="IsVisible" Then
ControlClick($hWin, '', '[CLASS:Button; INSTANCE:1]')
EndIf
Next
Exit
Ошибка : Error in expression
Как исправить?