Get window size for a running application?

I am trying to get the window size for a specific running application. I am launching the macro with a hotkey combination. The macro I have is below. It is returning the window information for KM instead of the applicatIon I am trying to reference (screen shot also below). How do I get the information to display for the specific application?

Thanks
AG

Try %FrontWindowPosition%, %FrontWindowSize% and %FrontWindowName%.

See if that works.

It’s also possible you need a short pause, like .3 seconds, between the activate and the display.

1 Like

Spending half a hour tweaking screencapture options values to get the right %FrontWindowPosition%.

Then stopping by on this gem. :grinning:

Thanks @DanThomas !

2 Likes

Not sure if my reply will help at all. Taken from this answer by gglick:

%WindowSize% will give you a window's size in pixels, %WindowPosition% will give you its coordinates, and %WindowFrame% will give you both. See https://wiki.keyboardmaestro.com/token/Window_Tokens for more information.

1 Like

It helps a lot @Bobby_Joe ! Thanks!

1 Like