EddieK Posted September 24, 2015 Share 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 Link to comment Share on other sites More sharing options...
water Posted September 24, 2015 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
water Posted September 24, 2015 Share Posted September 24, 2015 Here is the needed link to the SAP documentation. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
EddieK Posted September 24, 2015 Author Share 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? Link to comment Share on other sites More sharing options...
water Posted September 24, 2015 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
TheDcoder Posted September 24, 2015 Share 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 - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
EddieK Posted September 25, 2015 Author Share Posted September 25, 2015 RunWait("NwSapSetup.exe /silent /Product="SAPGUI710")This works Thank you all. Link to comment Share on other sites More sharing options...
TheDcoder Posted September 25, 2015 Share Posted September 25, 2015 @EddieK My pleasure EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
water Posted September 25, 2015 Share 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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
TheDcoder Posted September 25, 2015 Share 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 - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 25, 2015 Moderators Share 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! Link to comment Share on other sites More sharing options...
TheDcoder Posted September 26, 2015 Share 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 - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion 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