Created
August 7, 2017 13:20
-
-
Save aeppert/cd4188840a1db748cd5a340c93d6abe4 to your computer and use it in GitHub Desktop.
Resize Chrome to 720p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set theApp to "Chrome" | |
| set appHeight to 720 | |
| set appWidth to 1280 | |
| tell application "Finder" | |
| set screenResolution to bounds of window of desktop | |
| end tell | |
| set screenWidth to item 3 of screenResolution | |
| set screenHeight to item 4 of screenResolution | |
| tell application theApp | |
| activate | |
| reopen | |
| set yAxis to (screenHeight - appHeight) / 2 as integer | |
| set xAxis to (screenWidth - appWidth) / 2 as integer | |
| set the bounds of the first window to {xAxis, yAxis, appWidth + xAxis, appHeight + yAxis} | |
| end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment