Getting unexpected results with Windows management

Hello, I've been trying to make some scripts that move windows for me, for example to the left half of the screen, or the left 40%, or the left 25%. I've done okay with the Move and Resize command, setting left edge to SCREENVISIBLE(Main,MidX)-SCREENVISIBLE(Main,Width)*40%-10 and overall width to SCREENVISIBLE(Main,Width)*78% and so on. But sometimes it borks, seemingly not knowing the actual dimensions of the screen and thus moving the windows to incorrect places.

One idea I had was to put the screen width into a variable and do some math on it to get the windows into the places I wanted them. I am trying to do one script that can handle a 3008x1692 32 inch screen, an even larger 4K TV (not sure of the resolution), and my laptop screen. But it seems I cannot use variables in the Move and Resize field? Did I get the syntax wrong, or is it just not a thing? Has anyone else gotten solid window management using this kind of approach?

In a calculation field—denoted with the 'c' at the right end—you can just put the variables in directly, not as %Variable%foo%.

-rob.

1 Like

Thank you! That was exactly what I needed!

1 Like

Glad to help - make sure to click the check mark icon on my reply to mark thr issue as solved - the forum will then discourage any additional posts in the topic.

-rob.


This one right? Clicked!

1 Like