Placing a Window on a certain screen is not working reliably in KM11

I use a macro (screenshot attached below) to place windows on the 2nd screen. This used to work very reliably on KM10.

I think some of the assumptions change in KM11.

but now it seems that when it gets the variables it is not getting them reliably. So, sometimes I have to run the macro 2-3 times before it works. I am also attaching the macro if you want to try.
Second Left Window.kmmacros (2.0 KB)

1 Like

That sounds like the following issue:

It sounds like the underlying cause is a macOS problem, but since KM is an app made to fix macOS problems, I think you could solve this by repeating that command three times, perhaps inserting a short pause between each occurrence.

1 Like

Yes, this appears to be the issue @Airy linked to (a comment of mine in another topic) that apparently is becoming more and more prevalent. FWIW, it’s not KM’s fault, it’s the Apple API that is unreliable.

If you’re interested, I built a subroutine to position windows about a year and a half ago when I first encountered this issue that has been working well for me ever since. There are, of course, other methods available, but here’s a link to my subroutine if you’re interested in trying it out.

KMF: Repeatedly Position a Window (For Machines That Suffer From the Window Positioning Bug) - Macro Library - Keyboard Maestro Discourse

Thank you so much.

... and I am sure Apple hasn't even acknowledged the bug.

It's true that Apple's behaviour is not always good, but at least we're dealing with behaviour that we can work around with KM. KM can work around almost any Apple bugs.