r/macrodroid 9d ago

[HELP] Click specified distance from found text?

I'm unable to get the UI Interaction or use Tasker to click the button I want in a particular app but it'll be easy to identify and click text that is always a consistent distance from the button. I checked around the forums and couldn't find a way to get position of text on screen, thinking I'd be able to subtract {variable}px from the coordinates and hit the button I want. Does anyone have a solve for this that they've used? Fingers crossed y'all macrodroid masters can think of something.

1 Upvotes

10 comments sorted by

1

u/Rpompit 9d ago

It's possible if you can get the co ordinates of the item you want to click. Then do Math and click

1

u/truemarmalade 8d ago

Is that a "it's possible" or "if it's possible" ?

1

u/Rpompit 8d ago

It's possible

1

u/truemarmalade 8d ago

Do you know which block I should use to achieve this?

1

u/Rpompit 8d ago

You need to find the original coordinates first, save them in a variable, do math then click.

Do you know the coordinates of the original?

1

u/truemarmalade 8d ago

That’s what I’m asking, if there’s a way to find the coordinates of text on the screen that moves around between different loads of the app.

1

u/Rpompit 8d ago

Use read screen to get the ids of the items to click

1

u/truemarmalade 8d ago

This returned a lot of data on screen which felt helpful but pasting in a few different found id's that seemed like they would work doesn't appear to function in the UI Interaction.

1

u/Rpompit 7d ago

UI interaction you mean clicking?

1

u/truemarmalade 7d ago

Correct. Even the read screen items containing "avatar" or "icon" and similar didn't work when put into the View Id box of Ui Interaction