Get Coordinates For Windows With Mac's JavaScript For Automation
March 2023
This pulls the window coordinates for a single app.
#!/usr/bin/env osascript -l JavaScript
const appName = "iTerm2";
const windowCount = ..;
NOTE: This may not work with all apps. When setting window positions a different method needs to be used.
end of line