Jump to content
Sign in to follow this  
BinaryMuse

Automatic WinWaits?

Recommended Posts

BinaryMuse

Greetings!

I'm fairly new to the AutoIt community, though I did play around with it a bit in the past. I did a few searches on the forum with no success, so I thought I'd post here.

I'm doing some automation with some Windows components, like Display and Internet Properties; however, I am having to put a WinWait between every ControlCommand (like for switching tabs, clicking, etc) whenever the UI changes, else the script goes on without the UI. I would like to know if there is some sort of setting I can use to make all GUI functions, like ControlClick and ControlCommand, automatically do a WinWait using the first two parameters.

Thanks so much for any help!

Share this post


Link to post
Share on other sites
duckling78

One solution may be to make a custom function.

Here's an example:

Func ControlClickAndWait($winTitle, $text, $controlID, $button = "left", $clicks = 1)
    WinWait($winTitle)
    ControlClick($winTitle, $text, $controlID, $button, $clicks)
EndFunc

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.