Window-resizing, works on any resolution

On top of having 2 Macs, I sometimes change screen resolutions — so I’m hoping for a shared, resolution-independent way to size and position windows (Finder mostly, but any app, really). I use (and love) BetterSnapTool, but it doesn’t have a setting for what I want: ¼ display width, full-height.

My thinking is: I need to get the display’s current resolution, divide its width by 4, then set the current window width and top-left position accordingly.

I’m stumbling on a) everything related to screen size seems to be about SETTING it — not GETTING it and b) not being able to figure out parsing tokens like ScreenResolutions that return a set of comma-delimited values.

This simple macro shows a couple ways (yellow and green actions) to get the resolution:

resolutions.kmmacros (4.2 KB)

For the green example, you reference the fields with the [n] construct, where n is the field number you want to retrieve from the variable.

-rob.

1 Like

That’s awesome, thanks! I’ll dig into this ASAP! :sunglasses::+1:

There are probably even easier ways to do this; the above are just the ways I stumbled upon in my own testing and development :).

-rob.

Yellow actions did the trick! Thanks again — this has been on my back burner for months.

1 Like

Unless I'm missunderstanding what you are after, Keyboard Maestro can size windows proportionally to whatever screen the Macro is run on directly without any further steps:

https://wiki.keyboardmaestro.com/function/SCREEN

2 Likes