I created a macro to resize the frontmost application window when it activates. It is working well, but I would like the macro to work only when the frontmost application window dimensions are different from the ones when the window has been resized.
I have tried with the FrontWindowFrame token but didn't find any valuable solution.
Found the problem comes the way the macro is triggered. When I select "iTerm 2" in macro group and in macro settings, I get a yellow flag telling me the macro will not be triggered.
I moved the macro to the "Global macro group". The macro is now triggered.
The macro now has the following logic. If Window Frame 1 is 420,10,600,900 do nothing, if not, move and resize Window Frame 1 to 420,10,600,900. The macro is triggered when the application iTerm is activated.
What I do not get is that KM shows the condition is always false. If the condition is not met then the window is resized so the condition should be true then, no?
That's because you're looking at the macro in the KM editor, and the window frame token is giving you that window's frame data. If you open iTerm but keep the KM editor window visible in the background, you should see the condition change to true.