September 15, 2016

Finding Window Titles You Cannot See

Filed under: Automation,Scripting — Marcus Tettmar @ 11:33 am

Someone emailed today saying they were having problems trying to automate Internet Explorer 11 because it didn’t seem to have a window title.

Actually IE11 does have a window title. Each tab has a different window title. But you don’t see the title in the main title bar of the application.

By default applications show the window title in the title bar. Hence it’s name. But some apps manipulate the appearance of their title bar so that it doesn’t look like a regular Windows title bar. Indeed some apps have all borders removed so that you can’t SEE the title bar. But in all cases, the window will still have a title (unless it’s an empty string!).

So if you can’t see the window title, how do you find out what it is? Well, with Macro Scheduler there are several ways to find it. One is with the View System Windows Tool, which shows a list of all the windows currently available on the system, showing their captions and class names. Another is to use the Code Builders.

Here’s a video demonstrating these two methods. It also shows how I use a substring window match: