esullivan Posted October 23, 2015 Share Posted October 23, 2015 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? Link to comment Share on other sites More sharing options...
jguinch Posted October 23, 2015 Share Posted October 23, 2015 Maybe you can work with the window size and use it with WinWait (see help page)Local $hLogin = WinWait("[CLASS:Qt5QWindowIcon; W:376; H:820]") Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
esullivan Posted October 24, 2015 Author Share Posted October 24, 2015 I thought about that, but the window size might change. Link to comment Share on other sites More sharing options...
jguinch Posted October 24, 2015 Share Posted October 24, 2015 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) Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
jdelaney Posted October 26, 2015 Share Posted October 26, 2015 _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 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