max23ed Posted October 25, 2019 Posted October 25, 2019 Hi, i'm recording a setup for a program using mouse clicks , however, the problem is when the setup installs (the progress bar showing) the auto generated script by the recorder will not have a winwait() or sleep() to click the "finish" button when the setup is completed. is there anyway to do that automatically?
ur Posted October 25, 2019 Posted October 25, 2019 (edited) Keep waiting for finish button to detect, using its title text. May be like this. $time_out = 120 Func _WinWaitActivate($title,$text,$timeout=$time_out) ;Logging("Waiting for "&$title&":"&$text) $dHandle = WinWait($title,$text,$timeout) if not ($dHandle = 0) then If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) Else ;Logging("Timeout occured while waiting for the window...") Exit EndIf EndFunc _WinWaitActivate($win1,"Ready to Install the") Edited October 25, 2019 by ur
max23ed Posted October 25, 2019 Author Posted October 25, 2019 Thanks for the replay. The idea is to have au3recorder do this for me as i have many setups and writing manually is a lot of work since i'm working with 100+ setups.
ur Posted October 25, 2019 Posted October 25, 2019 au3recorder itself removed from AutoIT. You can only get it from older versions. So, no scope of adding new functionality to that. Reference
abberration Posted October 25, 2019 Posted October 25, 2019 max23ed, you should to look into silent switches for installers. You can run an installer with code like this: shellexecute("myprogram.exe", "/silent") This method would be more stable, install faster and more professional looking than having a script clicking 'next' buttons. The above example works with installers that were compiled with Inno Setup (the /silent part is the switch - you can also use /verysilent to install with no progress bar). There are other software installers with their own switches. Most big software companies provide what are called "command line switches" in their documentation or FAQ sections. If you can't find them online, you can email them to see if they are supported and what they are, if supported. Many years ago, I posted an example script that installed software using silent switches. You might want to look at it as an example (the config.ini section has many software switches listed). I hope this helps! My software installer: Easy MP3 | Software Installer | Password Manager
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