Trying to Sense When a Window Appears

One of my applications always puts up a window when it starts, which I have to immediately dismiss. I haven't been able to sense when that window is active. It doesn't have a title, and none of the window sensing conditions in KM have been able to pick up on it. To make matters worse, the dismiss button isn't picked up as a button by KM; I have to simulate a mouse click. That's also annoying. Any suggestions on how to pick up on when the window appears?
(I've already tried checking the app's front window condition and the app's any window condition.)

Which app is doing this please?

Seems like you have answered your own question: The target window always appears just after the app is launched.

As @jonathonl suggested, we need more info:

  1. Name of app (with a link to its web site if not a common app)
  2. Can you close the window with a keystroke, like "ESC" or ⌘W?
  3. Please post a screenshot of the window.

When the target window is open, try running this to get more info about it:
EDIT: Remove that link. Looking for the correct link.

Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

Application is TheBrain 11 https://thebrain.com

The window can be closed with any normal mechanism: cmd-W, ESC, click the red chiclet. The problem is sensing when the window becomes active. Every sensing function I can find in KM is not picking that up.

Does the window appear immediately after you launch the app?
If so, you might actually time it so we know how long it takes.

Here is one possible, untested approach:

  1. Trigger macro on launch of TheBrain
  2. Pause until TheBrain is frontmost
  3. Pause N sec (determined by your timing)
  4. Type Keystroke ESC

OR

  1. Trigger macro on launch of TheBrain
  2. Pause until TheBrain is frontmost
  3. set variable Local__FirstWinName to "%WindowName%1%"
  4. Pause Until Front Window Name is not ;%Local__FirstWinName%"
  5. Type Keystroke ESC

A timer was the first thing I considered, but didn't pursue it because it's:

  1. Inelegant
  2. Heuristic

The second one is close to something I've tried already. As I said, whatever TheBrain is doing with that window is so far bypassing what KM can sense.

Also: the "buttons" in the window are not detectable either, so TheBrain has dug in deep with the GUI here.

Who cares? Don't let that stand in the way of something that works.
You already know that KM can't see the window, so you have to make do.

That's the thing about a heuristic, is it doesn't always work. That means I'd have to set the timer for the worst possible case, which means the vast majority of the time I'd be sitting around waiting for no good reason. That's why I'd prefer to actually sense the window. I figure there's something deep in KM which will get around TheBrain's nefarious activity.

Unlikely.

But maybe this macro will provide you with the info you need:

MACRO: List Properties of Front Window

Yes! It lets me pick up on when that window appears. Thanks!
(Sorry for delay, had to focus on my paying job all week.)