Sign in to follow this  
Followers 0
m0ngr31

Waiting for next dialog box vs using the sleep command

4 posts in this topic

I just wrote my first AutoIt script yesterday, and I got everything to work fine, but it's ugly...

I'm installing a test taking software in a lab. I setup the script so that it waits for so many seconds and then pushed the next button. This isn't a perfect solution because once 30 computers start hitting the same resource on the LAN to download the file and then install it, it makes the script hard to predict when to press the next button because it's not always the same amount of time for each computer before the prompt comes up.

So my solution was to just have a big "sleep" time, but it's not ideal. Is there something in AutoIt that will allow me to just wait for the next dialog box to pop up instead of using a sleep setting? Obviously I don't want it to hit the cancel button during the install, so is it even possible?

Thanks

Share this post


Link to post
Share on other sites



Have you played with Au3Info on the controls to see if AutoIt can see them? If they can you can interact with the controls directly and simply wait for a condition to be met (control button or window to appear) and then activate the control? This method is especially easy to implement if the next button does not exist until the script is ready to continue (i.e. there is a popup box or window created)

See:

Help> Function Reference > Windows Management >

&

Help> Function Reference > Windows Management > Controls

For some information on interacting with controls directly, rather than using MouseClick

-K


-K

Share this post


Link to post
Share on other sites

Question, this might be able to be done in 1 line of code ( maybe just a few ).

Does this software have a silent install option for its command lines?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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