Jump to content

Waiting for next dialog box vs using the sleep command


Recommended Posts

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

Link to comment
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

Link to comment
Share on other sites

  • Moderators

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?

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...