2 points · by GrumpySloth · 4y ago · 0 comments
tell application "System Events"
set appOfInterest to "Microsoft Edge"
set windowXY to size of the first window of application process appOfInterest
display notification (item 1 of windowXY as text) & " x " & (item 2 of windowXY as text) with title "Frontmost window of " & appOfInterest & ":"
end tell
After that I tried the same with Terminal.app, but this one seems to be able to take just about any size. Then I tried checking the same with Firefox, but Firefox crashed completely and I don't have the patience to restart it repeatedly to find out what the threshold is.Anyway, funny conclusion is: web browsers have quite narrow acceptable operating conditions for their window sizes, where by "narrow" I mean: it's just a couple seconds of dragging with a mouse, nothing outlandish (although also quite an improbable use-case in the real world).
[1]: Found here: <https://robservatory.com/how-to-display-the-size-of-an-apps-frontmost-window/>
No comments yet.