# Accurately resize a non - Cocoa Mac application

I intend to do some screencasts and afterwards post them to Vimeo, which has requirements of resolutions that will certainly generate excellent outcomes. Thus, I would love to have the ability to properly and also repeatably dimension the application window I am making a screencast from, to make the most effective use that room.

Googling the trouble, I thought of solutions like this:

tell application "Safari"
activate
set the bounds of the first window to {140, 0, 1160, 775}
end tell


I located that this method collaborates with some applications I attempted (such as Opera and also Firefox), yet not with both applications I intend to make screencasts from.

When I attempt it with "Scratch" instead of "Safari", I get

AppleScript Error
Scratch got an error: Can’t set bounds of window 1 to {140, 0, 1160, 775}.

and also, I get a the very same mistake when I make use of "MINDSTORMS NXT" [the NXT - G shows language for Lego Mindstorms NXT ] instead of "Safari" (with the exception of the name of the application that created the mistake).

I assume, in both instances, that the mistake results from the reality that these are foreign (Cocoa) applications, yet constructed making use of cross - system collections. I additionally read that occasionally transforming the window number (ie. "2nd window", "3rd window") will certainly aid, yet it did not.

Currently after that, I actually do not require to recognize just how to do this in AppleScript, I simply desire a straightforward means to set the dimensions of a window for screencasting. Any person have a pointer?

0
2019-05-18 22:51:16
Source Share