I am looking for an app (App1) that runs in background, can detect screen content changes, and can simulate touch commands. An example use case is as follows.
Say there is an app (App2) that shows a red color rectangle. If App2 is kept open, the color of the rectangle changes to yellow after sometime. When this happens, I want App1 to detect that a color change happened, and simulate a touch on the rectangle. Assume App1 can have all necessary permissions (e.g., screen recording and accessibility permissions for simulating touches).
Is there an app that encompasses the functionality of App1?