Shawndt Posted February 8, 2010 Share Posted February 8, 2010 For some reason my script pauses before it kicks off the next install. Cant figure out why. Any help from You guys would be greatly appreciated. The adobe installation goes through fine and then before JRE it pauses. The install never starts. Run("D:\automation\Adobe Reader 9.1.EXE") WinWaitActive("Nationwide Services Company - Adobe Reader 9.1") Sleep("2000") Send("C") WinWaitActive("Nationwide Services Company - Adobe Reader 9.1", "Click Finish to exit") sleep("2000") Send("F") Sleep("3000") Run("D:\NRS JRE Fix 2.0.EXE") WinWaitActive("Nationwide Services Company - NRS JRE Fix 2.0") Sleep("2000") Send("C") WinWaitActive("Nationwide Services Company - NRS JRE Fix 2.0", "Click Finish to exit") sleep("2000") Send("F") Link to comment Share on other sites More sharing options...
Steveiwonder Posted February 8, 2010 Share Posted February 8, 2010 (edited) WinWaitActive("Nationwide Services Company - Adobe Reader 9.1", "Click Finish to exit") sleep("2000") Send("F") Sleep("3000") Run("D:\NRS JRE Fix 2.0.EXE") You have a 3 second sleep before the install runs, then you have a 2 second sleep before you send "C" Try this $winTitle1 = "Nationwide Services Company - Adobe Reader 9.1" $winTitle2 = "Nationwide Services Company - NRS JRE Fix 2.0" Run("D:\automation\Adobe Reader 9.1.EXE") WinWait($winTitle1) ControlSend($winTitle1, "", "", "C") WinWait($winTitle1, "Click Finish to exit") ControlSend($winTitle1, "", "", "F") Run("D:\NRS JRE Fix 2.0.EXE") WinWait($winTitle2) ControlSend($winTitle2, "","", "C") WinWait($wintitle2, "Click Finish to exit") ControlSend($winTitle2, "", "", "F") Edited February 8, 2010 by Steveiwonder They call me MrRegExpMan Link to comment Share on other sites More sharing options...
Shawndt Posted February 8, 2010 Author Share Posted February 8, 2010 WinWaitActive("Nationwide Services Company - Adobe Reader 9.1", "Click Finish to exit") sleep("2000") Send("F") Sleep("3000") Run("D:\NRS JRE Fix 2.0.EXE") You have a 3 second sleep before the install runs, then you have a 2 second sleep before you send "C" Try this $winTitle1 = "Nationwide Services Company - Adobe Reader 9.1" $winTitle2 = "Nationwide Services Company - NRS JRE Fix 2.0" Run("D:\automation\Adobe Reader 9.1.EXE") WinWait($winTitle1) ControlSend($winTitle1, "", "", "C") WinWait($winTitle1, "Click Finish to exit") ControlSend($winTitle1, "", "", "F") Run("D:\NRS JRE Fix 2.0.EXE") WinWait($winTitle2) ControlSend($winTitle2, "","", "C") WinWait($wintitle2, "Click Finish to exit") ControlSend($winTitle2, "", "", "F") Still have the same problem the script pauses. The install for Adobe finishes and then it pauses before it run JRE. Would this be, because I am calling a CD? Link to comment Share on other sites More sharing options...
Shawndt Posted February 8, 2010 Author Share Posted February 8, 2010 Nevermind........ I am retarded! Sorry to waste you guys time. Although, StevieW I did learn something from you, for that I am grateful. Link to comment Share on other sites More sharing options...
Steveiwonder Posted February 8, 2010 Share Posted February 8, 2010 (edited) More than likley yes or just its initialization Try this... $winTitle1 = "Nationwide Services Company - Adobe Reader 9.1" $winTitle2 = "Nationwide Services Company - NRS JRE Fix 2.0" Run("D:\automation\Adobe Reader 9.1.EXE") WinWait($winTitle1) ControlSend($winTitle1, "", "", "C") WinWait($winTitle1, "Click Finish to exit") ControlSend($winTitle1, "", "", "F") Run("D:\NRS JRE Fix 2.0.EXE") TrayTip("Waiting", "Running second install, now waiting for window to appear", 5) WinWait($winTitle2) ControlSend($winTitle2, "","", "C") WinWait($wintitle2, "Click Finish to exit") ControlSend($winTitle2, "", "", "F") When the first install is complete and the 2nd exe is called if you see the traytip then the you experience the pause, it would seem the .exe is doing something before it shows the install window... or your computer is slow.. or its just because its call from the CD drive. You could always move both Run commands to the top of the script so it makes it that little bit quicker if you wish.. Run("D:\automation\Adobe Reader 9.1.EXE") Run("D:\NRS JRE Fix 2.0.EXE") $winTitle1 = "Nationwide Services Company - Adobe Reader 9.1" $winTitle2 = "Nationwide Services Company - NRS JRE Fix 2.0" ;..... the rest of your script here... Edited February 8, 2010 by Steveiwonder They call me MrRegExpMan 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