Frank, I don’t seem to get any of these to work - do I need to install anything before I run them?
In KM, I am using shortcuts such as Opt-2, etc, to trigger the actions
You could try to extract the code from the macro (it’s just plist) and run that as a Swift script. Perhaps you’ll get an error message than that indicates where a problem might be.
UI scripting is error-prone and never a robust way to automate an app. Regardless of operating system, language and app.
For example, the script code I saw uses an offset of 10 pixels at a certain point – how does that work if the UI is zoomed?
What happens if a detail in the app‘s UI hierarchy is modified? What about timing issues, eg trying to click a button that has not been fully rendered yet?