Sign in to follow this  
Followers 0
Shawndt

Another Simple Question/Script pauses

5 posts in this topic

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")

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Nevermind........ I am retarded! Sorry to waste you guys time. Although, StevieW I did learn something from you, for that I am grateful.

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Steveiwonder

They call me MrRegExpMan

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0