Screen windows manipulation

I got a new monitor (LG 38BK95CW) and wrote a few macros to have some app's screen populate lower 2/3s of the screen left, center and right and others for windows to populate top 1/3d of the screen - also left/center and right.

For some reason, the top 1/3 windows intesected/covered 2/3 bottom windows in the middle, until I added 17 pixels (experimentally to move down option).

Changing SCREEN to SCREENVISIBLE did not help

It works now, but in some (but not all) of the 2/3 bottom windows the bottom of the windows is below the visible screen level (by about 20 px) and some windows look fine.

The ones that appear fine are KB Maestro, Skype, Finder windows.
The ones with bottom below the screen are Safari, Chrome, MailPlane.

What am doing wrong?

Here are my macros:





1 Like

17 pixels sounds like the active menu bar which is about 25 pixels.
we need a screen shot syspref .. displays .. arrangement

is your other screen say an internal macbook?

trouble shoot with km editor .. window ... mouse display to give you co-ordintates
note especIally that 0,0 is top left of active menu bar.

There are two issues that I am trying to solve.

  1. How to make a new functionality of KM i.e. SCREEN and SCREENVISIBLE functions to work - it should really work on screen of any size. While it is easy enough to calculate pixel locations and deduct 25 px size menu bar, the functions above should be a substitute for these calculations. I want to find out what in my syntax is wrong.

  2. Even using pixels instead of functions, for some reason some apps windows follow rules, while others do not - see above. I want to figure out how to make it work for ANY application windows.

I use internal vs external screens - I have a set of similar, but 1/2 screen size rules for internal display and it works just fine w/o any pixel adjustments.

Never-the-less, you should always use SCREENVISIBLE for cases like this.

If you want our help, it would be best to upload your macro .

We cannot really help you without a screenshot of the display arrangement as asked for above.
Also, please test with the value going to a global variable rather than the calculation being done in the screen(....) call
especially where the height and height offset is concerned.

and please see my writeup on SCREENVISIBLE in

This suggests that your formula for the "1/3" screen layout is flawed.

A post was split to a new topic: Macro Set to Move and Resize Windows into Thirds on a Screen

Thanks @JMichaelTX ! You were right of course that I had to use SCREENVISIBLE operator. Appreciate the example. Here is what I came up with - I put it in the pallet, but I use it as a macro group.

Window manipulation Internal:external screens Macros.kmmacros (34.7 KB)

It works - I made 3 px borders between windows.

There are still a few apps that that do not seem to resize perfectly (a little part of the window - about 10 px is hidden behind the bottom of the screen)

Most app windows have a minimum width and height they will allow. That is probably what you are seeing.