Jump to content
Sign in to follow this  
neous

problem launching script to install vs2005

Recommended Posts

neous

i'm trying to script the installation of visual studio 2005. i successfully launch the exe from its location.

then the installation component gets loaded, that takes less than a minute but i think that's where my problem start because eventhough i added a sleep time to allow for the loading of the needed components to finish , when the it's done the "Next" button is enabled but

can someone please tell me what i'm doing wrong?

here is a sample of the code

thanks

Runwait("T:\Software\VSTS\Microsoft V.....)

WinWaitActive("Microsoft Visual Studio 2005")

send("{SPACE}")

send("{SPACE}")

send("{TAB}")

send("{TAB}")

sleep(120000)

send("{Enter}")

Share this post


Link to post
Share on other sites
AutoChris

Rather than just putting Sleep() to wait for something to load, use WinWait() to wait for a particular window to load, including any unique text. Try to be as specific as possible for each window that loads to avoid any confusion as to which window you are waiting to load.

Share this post


Link to post
Share on other sites
neous

could i use winwait() even if it's the same window i.e. the only difference is that when the components are loaded the Next button is enabled? or should replace the winwaitactive with winwait?

Share this post


Link to post
Share on other sites
seandisanti

could i use winwait() even if it's the same window i.e. the only difference is that when the components are loaded the Next button is enabled? or should replace the winwaitactive with winwait?

use controlcommand() with the "IsEnabled" option to check if the button is enabled. just do a little while loop that sleeps on each iteration, and exits once the control is enabled. you also may want to look into controlsend() and controlclick().

Share this post


Link to post
Share on other sites
neous

use controlcommand() with the "IsEnabled" option to check if the button is enabled. just do a little while loop that sleeps on each iteration, and exits once the control is enabled. you also may want to look into controlsend() and controlclick().

Thanks i'll try that

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  

×