Autoinput is a plugin that also works with MacroDroid, you can do as in the link you put, it should work the same way.
And you probably don't even need Autoinput, maybe just Screen Content trigger and UI Interaction action.
To be tested in the real condition of use