Jump to content
Sign in to follow this  

How do I wait for greyed out button to become Active

Recommended Posts



I am new to AutoIt, I want to automate small UI wizard, I have been able to record all the action except the last stage where "Close" button is greyed out, untill the application finishes performing some tasks.

I tried using ControlCommand but somehow it did not work for me, may be I am not using it correctly.

I am copying my script here and also attaching snapshot of last page.

Can anyone help please?




_WinWaitActivate("New Project","Specify whether to c")



_WinWaitActivate("New Project","Please specify a pro")


_WinWaitActivate("New Project","Select a project sou")


_WinWaitActivate("New Project","Add project files or")



_WinWaitActivate("New Project","Please wait while th")

While Not ControlCommand('Activation', '', 'Close', 'IsEnabled', '')




#region --- Internal functions Au3Recorder Start ---

Func _WinWaitActivate($title,$text,$timeout=0)


If Not WinActive($title,$text) Then WinActivate($title,$text)



Share this post

Link to post
Share on other sites

You want the General Help & Support part of the forum. This part of the forum is for finished examples only.

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


Share this post

Link to post
Share on other sites

Yes, this is in the wrong category, and a mod will move this whole thread soon. I use code like this to 'press' a button, then wait until the process is done.

ControlCommand("Forum Spam List Checker", "", "Button1", "Check")               ; Query/Search button
Do                                                                          ;
    Sleep(10)                                                               ;
Until ControlCommand("Forum Spam List Checker", "", "Button1", "IsEnabled")  ;Wait until Search/Query is done

While this is very similar to the way you are attempting to do the same thing, I think your failure is that the window title is probably 'New Project', not 'Activation'. Also, use the Info tool to get the ID of that close button. A function like ControlGetText can be used to get the actual text on a control, but using the ID will be better in this case I believe. Good luck with your project, and remember, the Help file will soon become your best friend!

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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