Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Change The Size Of A Mac Window With JavaScript

This works with one way to make the change but there's a second way as well

js
#!/usr/bin/env osascript -l JavaScript

/*
Application("Google Chrome").windows[0].bounds = {
    "x": 20, "y": 20, "width": 800, "height": 900
}
*/

const appName = "Emacs"

const bounds = Application(appName).windows[0].bounds()

Application(appName).windows[0].bounds = {
// "x": 200, "y": bounds["y"], "width": bounds["width"], "height": bounds["height"]
"x": 10, "y": 100, "width": 900, "height": 500
}