Jump to content

wait until a window has loaded content


cerveza
 Share

Recommended Posts

You can wait for text to show up, take a look at the "Winzip Installation" in the helpfile.

sorry, but that is of no use to me. that script uses WinWaitActive, which waits until a window is active. the case with my window is that it becomes active the second it is opened, but takes about 10 sec to load its content. and i need to pause the script until the content is fully loaded.

the window doesnt have any text in the conventional meaning of it. it just has one big control which includes all the text, buttons etc.

and ofc the ID changes each time.. if there is a way to retrieve all control IDs from a window then Id be interested in that.

but anyways, thank you for the feedback.

Edited by cerveza
Link to comment
Share on other sites

Ok i assume "Schließen" is the control you are waiting for. You can do this various ways. I can't give you a fully working code, but maybe i can point you in the right direction.

local $handle, $counter
Do
    $handle = ControlGetHandle("[CLASS:Windowsforms10.window.8.app.0.73da59]", "", "NameOfTheControlLikeSchließenOrSomethinglol")
    sleep(1000)
    $counter += 1
    if counter = 10 
        $counter = 0
        exitloop
    EndIf
until @error <> 1

If you leave the Sleep and counter out, you might be stuck in an endless loop. This construction will try 10 times and between each try 1 second delay. Play with the values.

You can also use the same construction with PixelSearch or GetPixelColor to wait for a specific pixel to show up and then exit the loop.

It might be needed to change the "CLASS:" to the window title, like Ubersicht.

Edited by notsure
Link to comment
Share on other sites

got that idea in the meantime aswell and tested it. quite sad, but it does not work. the control handle can already be retrieved when the window is initialized, although the visual content of the window takes about 12 secs to arrive. quite strange also..

EDIT: color codes was a thing i though about eralier aswell, but didnt think autoit has the necessary functions for that. thanks for the help, gonna try it with the color functions.

Edited by cerveza
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...