How can I click the element I want using autoinput and increasing its X?

Ayano

Member
Thanks to autoinput, I can simultaneously click all the elements I see that have a certain View id, however now what I want to click is next to the 'element I want.

The elements do not have a specific position but change, I am only interested in finding them(which it already does automatically and is able to click them) however instead of clicking directly on the 'element, it has to click a little more to the right, thus increasing the X.

So what I would like to do is just increase the x by 20 from the position of the element found by autoinput, how can I do that?
 

Dimlos

Well-known member
Remember my previous answer to your question?
It's about getting integer values of X and Y from a string.
If you can get the variables as integers, it would be easy to do +20.
 

Ayano

Member
Remember my previous answer to your question?
It's about getting integer values of X and Y from a string.
If you can get the variables as integers, it would be easy to do +20.
yes I remember and you are right sir, it's just that I'm not sure how to do it in autoinput, that's it..
I can store the coordinates in a string variable so maybe I can split and convert it to make new two new integer variables
 

Dimlos

Well-known member
Sorry I can't offer a one-liner solution.
It would be possible to +20 by combining the processes.
 
Last edited:

Dev777

Active member
yes I remember and you are right sir, it's just that I'm not sure how to do it in autoinput, that's it..
I can store the coordinates in a string variable so maybe I can split and convert it to make new two new integer variables

This is just a modification of Dimlos' macro. Adds 20 to X coordinate
 

Attachments

  • split_string_variable.macro
    5.8 KB · Views: 4

Ayano

Member
This is just a modification of Dimlos' macro. Adds 20 to X coordinate
It works, I can figure out where the element is, it takes its coordinates, puts them in the string then it splits into an array and you do the click.

But the click it does, the x is right, the y however I don't know why it doesn't work, it should be like the Screenshot you see however it does the click at y1900 instead of the y said by the string @Dev777 @Dimlos
 

Attachments

  • Screenshot_20240301_124539_com.arlosoft.macrodroid.jpg
    Screenshot_20240301_124539_com.arlosoft.macrodroid.jpg
    488.4 KB · Views: 9
  • Screenshot_20240301_124551_com.arlosoft.macrodroid.jpg
    Screenshot_20240301_124551_com.arlosoft.macrodroid.jpg
    431.3 KB · Views: 9
  • Screenshot_20240301_124557_com.arlosoft.macrodroid.jpg
    Screenshot_20240301_124557_com.arlosoft.macrodroid.jpg
    164.2 KB · Views: 9
  • Screenshot_20240301_124811_com.arlosoft.macrodroid.jpg
    Screenshot_20240301_124811_com.arlosoft.macrodroid.jpg
    456.5 KB · Views: 9
  • Screenshot_20240301_124817_com.arlosoft.macrodroid.jpg
    Screenshot_20240301_124817_com.arlosoft.macrodroid.jpg
    418.5 KB · Views: 9
Top