Thanks!
Also, is there anyway to move a window, so it's right aligned to the left side of the center of the screen (again using percentages, so the macro will work on different screen sizes).
This image explains it better:
Thank you so much for your help. And thanks also for creating such a fantastic program. The more I use KM, the more awesome I find it. I wish I had discovered it earlier!
I moved your post to a NEW topic, since it is NEW question.
Please follow this approach in the future so that your new question will get proper recognition and notice, a separate "solved" post can be selected, and future readers can more easily find your question.
This should do it. Of course you can make adjustments if you do not want to use the entire left side of the screen for the window.
MACRO: Move Window to Fit and Align Right Side with Center of Screen [Example]
#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/f/6/f6c56b4dfd1fd908dca9ad9ee748160044550f76.kmmacros">Move Window to Fit and Align Right Side with Center of Screen [Example].kmmacros</a> (3.8 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
![image|690x728](upload://qBA8xDyJIBYwpfq8RFxGaofSzy.png)
Thanks for your help and also for explaining forum rules.
How do I use this in my existing Macro? Do I use "Execute Macro"? I tried that but it doesn't seem to have any effect on the window.
Just copy the IF/THEN Action and paste into your macro.
You can if you wish. It works fine for me:
To use my macro, you must first select the Window you want to move.
If you still cannot get it to work, please post/upload your script/macro.
Here is my Macro.
Keyboard Maestro 8.2.4 “If Then Else” Action
If Then Else.kmactions (2.7 KB)
You didn't provide any details about what is not working, so I'm just guessing here.
First, make sure you have selected the Window you want to move.
Then trigger the macro.
Second, why did you change the "in: <app>
" from "Front Application" to "Dictater"?
Please try the macro exactly as I posted here.
Aah, I think the problem is the Dictator App. It has a special floaty window, which I've just noticed can't be resized. If I try your Macro on a normal window, it works perfectly.
To make it work with Dictor App, I just modified your Macro a bit. In case anyone else wants to do this, you just need to use a "Move" action, that has the following:
Move to -> SCREENVISIBLE(Front,Left) + ( (SCREENVISIBLE(Front,Width)*50%) - WINDOW(Width) )
And then it works perfectly!
Thanks for your help.
1 Like