It would not seem to be there may be such device. Please, for the love of God,
show me improper.
You’re proper that almost all ‘macro’ recorders will simply do what is named “GUI scripting” — that’s, mimicking the actions of a consumer, shifting the pointer to an X, Y coordinate and executing a click on. If the place of the window adjustments, then this course of breaks.
For this reason Apple created AppleScript, in order that instructions would set off actions, e.g. open, save, get, and many others, making scripting a lot simpler and extra dependable. However that requires that there’s a command to do what you need; which, within the case of adjusting the settings of a show, is just not the case.
Shifting additional down in the direction of the steel, your subsequent port of name is utilizing the identical strategies that Apple makes use of while you press the buttons. The OS supplies all types of capabilities that may be accessed by lower-level languages like Swift.
I’ve seen some python utilities that present strategies of configuring shows, like Show Supervisor (although that must be up to date for python3.)
Nevertheless, in the end, this looks as if an X-Y query, as you are asking questions on one technique, quite than about your purpose, which is one thing to do with how and why you could change the underscanning of a show.