Place unruly app windows

One of my apps (Rumlog for Ham Radio) normally requires about 4-6 open windows while in use. They tend to appear randomly across various desktops on my Mac, obscuring other apps, and even obscuring its own windows. Wondering if there is some action that would open the required windows, place them in a selected desktop and adjust their size/position according to my own preferences.

The is no one Action that will do all that, but you could write a Macro to do most of it. Since Apple has not exposed the Desktop APIs, neither KM nor any tool (including scripts) have access to Desktops.

But you could open a different/new Desktop, and then have a Macro that launches the app and arranges the windows.

Here's a simple Macro that will move and resize the windows based on either Window Title (as currently designed) or Window Index (shown in the disabled Action). Maybe you can use this to get started.

You will need to change:

  1. The App that is activated and in the Pause Until
  2. The two magenta colored Actions that set:
    • The Title of the window to be matched/set
    • The Position and Size of the window

UPDATED: 2019-09-08 17:20 GMT-5

  • Revised Macro to set position and sizes based on frame of target screen

MACRO:   Rearrange All Windows in an App Based on Title [Example}

~~~ VER: 2.0    2019-09-08 ~~~
Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

DOWNLOAD Macro File:

Rearrange All Windows in an App Based on Title [Example}.kmmacros
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.



Thank you. For the most part, the individual actions function when activated manually from within the gear icon in each of the macro steps. However they don't seem to want to work as a linear set of actions. The try button simply produces the an error message: "could not find target application in macro".

Also wondering why one of the actions in your Macro that is greyed out; I'm unable to edit it or delete it. Finally I created a text string "asdf" as an experimental trigger in the first step, however that doesn't seem to produce any action at all. My apologies for all the rookie questions, I'm certainly on a learning curve here!

Sometimes that will work, but most of the time you need to run the entire Macro for the variables to be properly set. You can do this by clicking the "Run" button at the top of the Macro edit panel:


Did you follow my instructions?

That means the Action is disabled. Just click on the Gear menu and select "enable"


Using Typed String Trigger is probably a bad choice for this macro, since you are unlikely to be in a text area when you need to trigger it. Best to assign a HotKey trigger.

No problem. Maybe this will help.

Getting Started with Keyboard Maestro

For more help, see Getting Started with Keyboard Maestro and the Forum .

Thank you so much! Using the run button at the top everything seems to work, with the exception of the hot key. I've tried several combinations so far, but I'm sure I'll find the answer to that in the manual. Again, thanks; much appreciated!

What do you mean by it doesn't work?

Have you assigned a hotkey like this:


Yes, exactly.

Thinking this might be your problem here:

Make sure the macro group containing this macro is enabled, and then see if you can't still use the hotkey.


Indeed, I didn't notice that macro was part of a disabled group. Problem solved! Thank you!

1 Like