Jump to content

WinGetText and ControlGetText sometimes not working


Recommended Posts

I try to get the text from win 8.1 popup windows but WinGetText and ControlGetText sometimes don't work at certain types of windows.

For example when closing Notepad, the text can not be extracted from the popup "Do you want to save changes to.." . This looks like a "PHANTOM WINDOW" the text is there but behaves like non existing. V3 Window Info shows as visible text only "&Save Do&n't Save Cancel" , these are the button texts but where is the rest of the text?  V3 Window Info shows no hidden text.

Also  noticed these problem windows have a horizontal line above the "&Save Do&n't Save Cancel" buttons.

The class name is alwys DirectUIHWND.

Can the text be extracted from such windows?

Does anybody know the solution?

Thanks

 

Untitled.jpg

window.jpg

Link to post
Share on other sites

This Text-control is a modern windowless control without a control or window handle. It can't be handled with standard window or control functions and it can't be identified by the "AutoIt Window Info" tool.

Such controls can be detected with Inspect.exe in Windows SDK or the "Simple Spy Tool" in the UI Automation framework.

The text can easily be extracted with a few lines of UI Automation code. If you are interested I can create some code.

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

    No registered users viewing this page.

×
×
  • Create New...