Can I use Macrodroid to click on a "stop" button inside a screen (not an alert or notification) without hardcoding the coordinates (w/o AutoInput)?



I have a screen like this:

With 3 stop buttons, their position on the screen might change, and once you click one stop, it might disappear, etc
I guess in that case I could hard code to the first stop position, and keep clicking it as I click all 3 assuming it bubbles up, but let's say it's not, or you can't rely on the coordinates, is there a way to tell Macrodroid to do a click that's based on where there is a button with prompt "Stop" in it, or does it require a special plugin such as AutoInput to do something like this? I know that for an alert/message or notification window, you could tell Macrodroid to press based on the button/option text, but not sure if it's true for a regular screen that has some buttons inside it.



Why not use kill background process function?
I'm trying this template and adapt it to Motorola services:

So the two are:


That’s probably the two that I need to manually stop under running services each reboot.

I loop through an array variable to execute this template for each one. This is my list:



After it stops all 3 (I think some overlap or the same thing)
The screenshot is what I see when I still see Motorola Software Update under running services:

But only when I click manually stop for OtaService and FotaController that’s when Motorola Software Update disappears from running services. So I don’t think the technique provided in the template is stopping/killing these services that run under this hosting app for these services that’s why I'm asking if there is another way to kill/stop services inside the app - Maybe need to obtain the full name of package name + path to service somehow and/or use alternative ways?


Use UI interaction with click on text.
So that will be equal to doing AutoInput with field type Text? Because I was under the impression that it has to be a button or option only inside a dialog window or or a notification. I’ll try it, looks like it’s working, thanks.

@Endercraft Btw, is there a way to make it go to directly to settings running services? Or do I need to launch settings app and then manually use ui interaction to type in the search “running services” and then click on the result to open it?
Or launch package something like this:
am start -n -e :settings:show_fragment
Is it supported?
Last edited: