Goal: Arrange window/app to a specific position and size on macOS screen
I've tried to achieve it using Apple-script, here is an example
tell application "System Events" to tell application process "Google Chrome"
activate
set frontmost to true
tell window 1 to set {size, position} to {{1920 / 3, 996 / 2}, {0, 0}}
end tell
Since, I use Apple-script I have to uncheck sandbox from Xcode project settings which I hate it. I want my app to be part of Appstore, I assume to do that I should be able to mimic the above apple-script using Accessibility APIs but I am not quite sure where to start as it is very unclear where to start.
Tech goal: Able to arrange app on the screen using Accessibility APIs
Any guidance or working example would be great.