4u2ges Posted October 5, 2018 Posted October 5, 2018 Hello all! I'm having some difficulties grabbing a window. The main windows does some processing for a while and when it finishes the popup message comes up, where I need to click OK. The problem is, that there is no difference between main window and a popup. There is no control or text is available, the title and class are the same. The only different as far as I can see is the "Style". I am not sure how reliable would it be to use that. And I have no idea how to use it either, as I could not find anything that would refer to Style in the documentation for WinWaitActive or similar controls. Thank you.
pixelsearch Posted October 5, 2018 Posted October 5, 2018 (edited) Hey 4u2ges, As you don't have text to help you, maybe you could use the windows dimensions to differentiate them. Have a look at WinGetPos in the help file, it will show you how to get the width & height of the active non-minimized window, then you will compare them with 188 & 161 (coords of your "complete" little window as seen in your pic). When coords match, then you'll know the "complete" window is displayed and let your script continue. This could be done within a loop (with a 5 sec sleep function in it, for example) or better, with AdlibRegister (that I never used until now but everybody says it works very fine !) Good luck Edited October 5, 2018 by pixelsearch "I think you are searching a bug where there is no bug... don't listen to bad advice."
4u2ges Posted October 5, 2018 Author Posted October 5, 2018 Thanks a lot for suggestion pixelsearch! I would definitely give it a try tomorrow. Will post back with outcome.
jdelaney Posted October 6, 2018 Posted October 6, 2018 You can also use winlist, and loop to find the new handle in the returned array 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.
caramen Posted October 6, 2018 Posted October 6, 2018 (edited) I want to try to reproduced this case to learn to play with. If I make Two gui With same name and One label with same text. Will I have same problem? Becose i expect attach the win handle with winwait or winactive is very good. I tested a lot of win handdle attachement with that and it is working v good. Edited October 6, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
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