h711 Posted September 3, 2008 Share Posted September 3, 2008 Hi, I try to automate an installer. On one page, the installer will try to detect network devices. While in the progress of detection, a progress bar is rolling. If all devices are detected, the progress bar will show "Finished". I try to let the script wait until the progress bar show "Finished" by : WinWaitActive("Installation Wizard", "Finished") The problem is that the automation paused at that point, even after the progress bar shows "Finished". Any idea how to get this right? Title: Installation Wizard Class: #32770 Control Class: KX-PROCESSBAR Instance: 1 ClassnameNN: KX_PROCESSBAR1 Advanced(Class): [CLASS:KX_PROCESSBAR;INSTANCE:1] Link to comment Share on other sites More sharing options...
Skruge Posted September 3, 2008 Share Posted September 3, 2008 Welcome to the forums. GuiCtrlRead can be used to get the percentage of a standard Progress Bar. (msctls_progress32) However, the Control used by your installer is different class. See what it's able to read... You may need to use another indicator of completion. For example, the text on a "Next" button may change to "Finish", or the "Next" button is hidden and the "Finish" button is made visible. Good luck! [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
h711 Posted September 4, 2008 Author Share Posted September 4, 2008 Thanks! Is there a way to detect a button that is grayed-out? The "Refresh" button is grayed-out during search, but the text on the button is always "Refresh" even when it is grayed-out. Link to comment Share on other sites More sharing options...
Champak Posted September 4, 2008 Share Posted September 4, 2008 If ControlCommand("Window Title", "Some text of the window if you want", The contorl number, "IsEnabled") Then Link to comment Share on other sites More sharing options...
h711 Posted September 4, 2008 Author Share Posted September 4, 2008 Thanks! Is there a way that I can keep checking if that button is enabled or not? This "Refresh" button is first disabled during the search, then enabled after the search is over. So what is the best way that I can let the program pause the program while the button is disabled, and resume the automation when the button is enabled? Thanks for the help! Link to comment Share on other sites More sharing options...
Champak Posted September 4, 2008 Share Posted September 4, 2008 While 1 sleep(60) If ControlCommand("Window Title", "Some text of the window if you want", The contorl number, "IsEnabled") Then Resume Else Pause EndIF Wend Link to comment Share on other sites More sharing options...
therks Posted September 4, 2008 Share Posted September 4, 2008 That works, but I prefer this approach. Do Sleep(500) Until ControlCommand("title", "text", controlID, "IsEnabled") My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now