Jump to content

Recommended Posts

Posted

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.

wh.jpg

Posted (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 by pixelsearch

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted (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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...