Using Hammerspoon to automate apps which aren't exposed to AppleScript (Affinity Photo, in this case.)
Wrote the Lua to open a new Photo document* which works as expected in the Hammerspoon console. Is this the only way to run this, open Hammerspoon and put the code there? I assume I'm missing something obvious.
Hoping for a keyboard shortcut to run this so I can, from anywhere on my Mac, fire up Photo with a new document.
joel
*Affinity apps get confused by Mac dual monitor setups and open new documents on the non-primary monitor, BEHIND all the dialog boxes. So upon creating a new document, the first thing I do, multiple times a day, is use my existing keyboard shortcut from, erm, Karabiner or something else I've forgotten because it's late and I'm tired, and move the document to the correct monitor. My Lua/Hammerspoon script makes this all happen automagically.