I would like to create a tool that allows you to set windows to exact sizes on the pixel scale to be able to have more precise screen divisions.
For example, if I had four Terminal windows (and I didn't have something cool like iTerm to do this for me), I'd like to be able to set each one to 1/2 screen height and 1/2 screen width, and people to position them via x, y coordinates so that they took up the entire screen, and exactly one fourth of them individually.
Can this be done using applescript?
system_profiler SPDisplaysDataType | grep Resolution
in iTerm to get the screen resolution. Or open upSystem Profiler
and it should tell you. One more thing to try is to use the bounds property of a window in AppleScript: you can make a Finder window open completely (drag to fill entire screen) and then runtell application "Finder" to get the bounds of the front window
in AppleScript and it will return the bounds, which represents the area of the window. – sameetandpotatoes Aug 06 '13 at 05:08tell application "Finder" to get the bounds of the front window
, this will return the area of the window which is the full bounds of the screen. It will return it in this format: {72, 90, 512, 481}. – sameetandpotatoes Aug 06 '13 at 05:2937:43: execution error: Keine Berechtigung zum Senden von Apple-Events an Finder. (-1743)
– BabyBoy Jun 17 '21 at 06:08