Resizing macOS app windows for 16:9 screen capture
I frequently need to capture a window of some Mac app for a recording (usually for my YouTube channel), and I've used a little AppleScript I wrote years ago for the purpose.
Somehow, that script (which I saved as a 'one shot' App (.app
extension) that just runs then quits) got deleted off my Script Editor folder in my iCloud Drive, so I had to re-create it.
Luckily, the syntax for this operation is dead simple:
tell application "Safari"
set bounds of front window to {0, 50, 1280, 770}
end tell
You can adjust the {X, Y, width, height}
parameters accordingly—note that the width and height seem to be additive to the X/Y. So I use 770 instead of 720 for the height (720 + 50).
In Script Editor
, save the file as a .app
, with the option to keep it running unchecked. Now, whenever you want a window sized perfectly for capture, just press Command + Spacebar, then type in the name of the Script/App you saved, and hit enter. The top-most window in Safari will scale to exactly 720p resolution.