Others will probably tell you about AppleScript, which I don’t use. If you want to know about JavaScript scripting, you can search the forum for examples. There’s also Scripting with JXA | JavaScript for Automation (JXA) on JavaScript for automation with some examples for DT and other apps.
And then there’s the manual with its section on “Automation”.
↧
Creating a Script to automate sequentially entered Menu commands
↧