Djad33 Posted September 23, 2022 Share Posted September 23, 2022 Hello, I know this subject has a few topics, but I can't find any answer to my problem. I'm using autoit to automate a PC SOFT program install but there is one moment when the windows stays the same, but the program is installing and the "Terminer" button is grayed and unclickable. I want for the script to wait until the button is clickable then click it. Here's my code so far, can you tell me where I'm wrong : ; Define members Local $clicked = 0 Local $buttonName = "&Terminer" Local $timeout = 3 ; Wait three seconds for the button activation test For $i = 1 To $timeout Step 1 ; test if button is active If ControlCommand("PC SOFT", "Terminer", "[CLASS:Button; INSTANCE:1]", "IsEnabled", "") <> 0 Then ; Click button and end loop $clicked = ControlClick("PC SOFT", "&Terminer", "[CLASS:Button; INSTANCE:1]") ;If $clicked = 1 Then ExitLoop EndIf EndIf Sleep(100) Next Link to comment Share on other sites More sharing options...
Djad33 Posted September 23, 2022 Author Share Posted September 23, 2022 Actually never mind, the program I try to install shows the button as active even when it's greyed and unclickable. Any idea how I could click it when really active? Link to comment Share on other sites More sharing options...
Musashi Posted September 23, 2022 Share Posted September 23, 2022 1 hour ago, Djad33 said: I'm using autoit to automate a PC SOFT program install but there is one moment when the windows stays the same, but the program is installing and the "Terminer" button is grayed and unclickable. Have you checked, if the Installer of the PC Soft program offers the option to run via command line parameters, e.g. silent or unattended ? "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now