Skip to content
⌘ NSIS Forum Archive

FindWindow Wildcard

6 posts

andyb123#

FindWindow Wildcard

Is it possible to search for a WindowTitle using a wildcard?

My situation is that I can't use the WindowClass and my application's window title is dynamic. However, there's always a substring of the window title that is static. If I can use a wildcard when specifying my WindowTitle when using FindWindow, it would be possible to locate my application.
andyb123#
That would work if I was searching by class name. But I'm not. I'm searching by window title.
Anders#
You should be able to just replace the call to GetClassName with GetWindowText

Another option would be to use something like RegisterWindowMessage in your application, and send the message(with timeout) to all top level windows and look for a non 0 return in the installer (not fool proof, but neither option is)