Jump to content
Sign in to follow this  
h711

How to set WinWaitActive to wait for end of the progress bar?

Recommended Posts

h711

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]

Share this post


Link to post
Share on other sites
Skruge

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]

Share this post


Link to post
Share on other sites
h711

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.

Share this post


Link to post
Share on other sites
Champak

If ControlCommand("Window Title", "Some text of the window if you want", The contorl number, "IsEnabled") Then

Share this post


Link to post
Share on other sites
h711

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!

Share this post


Link to post
Share on other sites
therks

That works, but I prefer this approach.

Do
  Sleep(500)
Until ControlCommand("title", "text", controlID, "IsEnabled")

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.