Q: How do I use Swift to move a new document window when it’s created?
Environment: MacOS Monterey Mini 2014
More:
An app I use (Affinity Photo) has a bug where new documents open behind the tool panels. Every new document has to be moved (keyboard shortcut using Rectangle) to see it and begin work.
Photo is not exposed to AppleScript so I can’t automate the window move, and the bug is fixed in an update which removes what I consider vital features, so I can’t use that.
Unnecessary details:
I started using Xcode to learn Swift just for this purpose, and though I’ve gone through a half-dozen tutorials and searched a bit, I’m no closer to understanding this specific need. As a retired web developer, I have no need for a complete understanding of Swift programming, but as a full-time amateur artist, I use tools like Photo and VSCodium ((VSCodium/VSCode and other apps also have no scripting library) all day every day, and a few hours grasping this concept would still have a high ROI.