Two Step Split Window Macro

Two Step Split Window Macro

I thought the if-then-else decision was interesting, and logic for maintaining the size.

This macro will move the current window to the right edge of the screen without resizing it. If it's already touching the right edge of the screen, it will resize the window so it occupies the right 50% of the screen.

Sometimes you want to move the window aside, and sometimes you want it to fit the entire right side.

This is also my quick-n-dirty split screen macro.

I also use the same method for the left side, the top, and the bottom edges.

Move to Right 50%.kmmacros (3.8 KB)

Works like a charm!

How do you get the left macro to work? I swapped “left” for all the instances of “right” in your macro, but the application window goes off the left side of the screen.

The Move To for moving to the left side is just SCREENVISIBLE(Front,Left).

SCREENVISIBLE returns coordinates on the “desktop space”, which has an origin of the top left corner of the “main screen”(the one with the menu bar on it in the Displays System Preference.

Window positions are for their top left corner.

I'm not quite getting it, Peter.

Here's what I've got trying to make CareyB's "Move to Right 50%" into "Move to Left 50%." I've tried replacing "right" with "left" in the below one at a time and in every combination. What am I missing?

Hey Pariah,

A clear understanding of what the macro is doing?  :smiley:

I'm not all that clear on why Carey did it that way myself, but I'm sure he has his reasons.

Take a good long look at the minus sign in his macro, and you'll see why just replacing Right with Left won't work.

Whittle that macro down to just this to start.

-Chris

Keyboard Maestro has these built in as options to the Manipulate Window action:

1 Like

I don’t want the window to resize. I want it to snap to the left edge of whichever monitor it’s on, unless it’s already at the left edge. If so, THEN I want it to resize. That’s what I like about Carey’s macro, but it only works on the right side.

Just change the Move To to SCREENVISIBLE(Front,Left).

That did it! Thank you very much.