EddieK 0 Posted September 24, 2015 Hi all,first sorry for my english. I want my script to press the finish button when the installation progress has finished (without sleep command). Background is to install the software on different machines. One is faster then the other.Run("NwSapSetup.exe") sleep(500) WinWaitActive("SAP Front-End Installer") ControlClick("SAP Front-End Installer", "&Weiter >", "Button1") sleep(500) WinWaitActive("SAP Front-End Installer") send("{SPACE}") sleep(500) ControlClick("SAP Front-End Installer", "&Weiter >", "Button1") sleep(500) WinWaitActive("SAP Front-End Installer") sleep(500) ControlClick("SAP Front-End Installer", "&Weiter >", "Button1") WinWait("SAP Front-End Installer") sleep(120000) ControlClick("SAP Front-End Installer", "Beenden", "Button1") Could you please help?Thanks Share this post Link to post Share on other sites
water 2,369 Posted September 24, 2015 Welcome to AutoIt and the forum!Couldn't you use the /silent command line switch so you do not need to automate the GUI?Bei Bedarf kannst Du die Frage auch auf Deutsch stellen My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
water 2,369 Posted September 24, 2015 Here is the needed link to the SAP documentation. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
EddieK 0 Posted September 24, 2015 Hi water,thanks for your response. I'll try the command line switch.But is it possible to work without sleep command? Share this post Link to post Share on other sites
water 2,369 Posted September 24, 2015 Sure. Sleep is not needed at all. Each line is only executed when the previous line has ended processing.What I would suggest is to check for errors after running a function. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
TheDcoder 1,179 Posted September 24, 2015 (edited) @EddieK RunWait can do the trick Just noticed that you want to click the finish button, there is an alternative, Use RunWait like this:RunWait("NwSapSetup.exe /silent") ; This will install the program in the background (waits until it finishes intalling) TD Edited September 24, 2015 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation Share this post Link to post Share on other sites
EddieK 0 Posted September 25, 2015 RunWait("NwSapSetup.exe /silent /Product="SAPGUI710")This works Thank you all. Share this post Link to post Share on other sites
TheDcoder 1,179 Posted September 25, 2015 @EddieK My pleasure EasyCodeIt - A cross-platform AutoIt implementation Share this post Link to post Share on other sites
water 2,369 Posted September 25, 2015 Just noticed that you want to click the finish button, there is an alternative, Use RunWait like this:RunWait("NwSapSetup.exe /silent") ; This will install the program in the background (waits until it finishes intalling)TheCoder,by using the "/silent" switch there will be no GUI and hence no need to click the finish button. And "/silent" has already been proposed in post #3 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
TheDcoder 1,179 Posted September 25, 2015 (edited) @water I wanted to show him the usage of RunWait & /silent switch, TD P.S I am not TheCoder Edited September 25, 2015 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation Share this post Link to post Share on other sites
JLogan3o13 1,624 Posted September 25, 2015 You're glossing over the point where you basically just restated what water had already suggested.... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites
TheDcoder 1,179 Posted September 26, 2015 Ok, sorry if made a mistake, I am still learning . Appreciated for guiding me... TD EasyCodeIt - A cross-platform AutoIt implementation Share this post Link to post Share on other sites