Moving a window in only one direction

Hello!
I am trying to create a macro to simply move a window to the top, while not moving it horizontally in any way, but I can't figure out how to do that.

Leaving the field empty results in a failure.

If you phrase it another way:

"I am trying to create a macro to simply move a window to the top, while keeping the window's left edge in the same place"

...then:

Move Front Window

Thank you! I don't completely understand it, but it works!

WINDOW(Left) gets the coordinate of the left edge of a window -- KM is smart, and when you use it in the "Move Front Window" action it assumes you mean the window you are moving so you don't have to say which window you want.

So the action is, quite literally, "Move the front window of the front application so that the left edge is where the left edge is now and the top edge is at the top of the visible screen (snug under the menu bar)".

1 Like