Jump to content

WinWaitIssue


Recommended Posts

Creating a script for fun and to help learn Autoit some.

I am creating one to download, install, and configure Origins.  I have been using WinWaitActive to wait for certain windows to be active.  However the login window and the main windows for Origins have the same title and class.  I have attached screenshots of the Window Info.

So when I WinWaitActive for the main window, it doesn't wait since the login window has the same name.  I don't want to use Sleep, as the launch time could very.  Anyway around this?

Login.JPG

Main.JPG

Link to comment
Share on other sites

So, use WinList("[CLASS:Qt5QWindowIcon]") to get all this type of windows. Next check the parent window with _WinAPI_GetParent or try to compare the size if each window (maybe the login window is smaller than the main one)

Link to comment
Share on other sites

_WinAPI_GetWindow with a param of 6 get's the 'enabled popup' of the parent window:

$a = WinList("[CLASS:Qt5QWindowIcon]")
For $i = 1 To UBound($a)-1
    $hPopup = _WinAPI_GetWindow($a[$i][1],6)
    If IsHWnd($hPopup) Then
        ExitLoop

    EndIf

Next
ConsoleWrite($hPopup & @CRLF)

 

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
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...