Moving app windows not always work…

Hello community!
I have a "workflow" where it launches a few apps and webpages, let's say, at the same time. It's not launched from KM, it's either from Raycast or Spotlight. The thing is that KM not always center the app window, today is one app, tomorrow it's another one. I tried to set some pause triggers so they don't overlap but, it's a dance, they are few apps, 10 maybe…
Is there any solution or another way of achieving this correctly? Oh, this is a setup with 2 displays, the MBP and an external monitor.



i've solved this by running every 'resize & move' Action twice but i hope someone who knows more about how this action works can add to my understanding.

and in some scripts i ended up using Apple Script to resize/move windows.

1 Like

Ok! I've duplicated them all, let's see how this ends up! :slight_smile:

It sounds like you’re experiencing the window positioning “bug” that is becoming more prevalent. This issue is a fairly well-documented one, dating back at least a couple of years. Sonoma seems to have made the matter much worse however.

Anyhoo, note Peter's comments on one particular post (tl;dr: it’s Apple’s API, not Keyboard Maestro):

Make sure you are up to date with the latest KM version as he implemented a workaround to mitigate the crappy Accessibility API (as can be seen in this comment).

All that being said, I often times make use of a subroutine I built sometime back to position windows. It’s not as good as the native KM actions, because those can set windows based off of calculations and percentages, but if you just need basic window manipulation it works quite well. See the link below to my post with the macro and information.

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

1 Like

Got it! Yes, I'm running Sonoma, on an M1. Let's see how this Repeat action behaves.
Thanks so far for the feedback.


1 Like