How to create a variable Y that can increase or decrease by 10?

Ayano

Member
How to create a variable Y that can increase or decrease by 10?

I want to create a series of clicks, they must have the same x and must start at y 5000 however all other clicks must go up, so the next click must be higher than 10 y.

For example:

First Click: x: 1000 y: 5000
Second Click: x: 1000 y: 4990
Third Click: x: 1000 y: 4980

Etcetera and continue like this until 2000, the point I want.

So far I have been creating each point manually with each individual coordinate, however I want to do it with variables so it will be much easier and faster crosswise.
 

hsurB

Well-known member
Use set variable action - integer variable - Expression - in the field put:
{v=YourIntegerVariableName}+10 or lv instead v if its local variable. Each time action is performed it adds 10 to your variable cause the rest of expression is replaced with current variable's value.
 

Ayano

Member
Use set variable action - integer variable - Expression - in the field put:
{v=YourIntegerVariableName}+10 or lv instead v if its local variable. Each time action is performed it adds 10 to your variable cause the rest of expression is replaced with current variable's value.
It does not work.

I created a Do While loop because I want thisq macro to continue until it reaches y200 and then it has to stop.

When I start the macro I don't see the clicks, they are like at y30 x 30.

I don't know ste I am doing things correctly, I am still a beginner, could you help me please?
 

Attachments

  • Screenshot_20240214_174511.jpg
    Screenshot_20240214_174511.jpg
    99.1 KB · Views: 14

hsurB

Well-known member
It doesn't work cause at the start of loop it sets variable back to 5000. Try moving these 2 first actions from loop to the top (out of your loop). This way it will set it to these coordinates at each start of your macro (as starting point for your clicking). I'd consider (and recommend) adding another wait before next action before ui interaction (click) even with low timeout.

You can click your set variable action (at the bottom of loop), test it and check at the bottom of your screen (local variables) if the value updates correctly
 
Last edited:

Dm114

Well-known member
'tbIt does not work.
I created a Do While loop because I want thisq macro to continue until it reaches y200 and then it has to stop.

When I start the macro I don't see the clicks, they are like at y30 x 30.

I don't know ste I am doing things correctly, I am still a beginner, could you help me please?
I haven't seen your macro but don't forget to insert a Wait action between every UI Interaction otherwise UI Interactions will run too fast.

To debug your macro I would suggest to use a long enough delay (such as 1s or 750ms) in the Wait actions to visibly follow every UI Interaction.
 

Ayano

Member
'tbIt does not work.

I haven't seen your macro but don't forget to insert a Wait action between every UI Interaction otherwise UI Interactions will run too fast.

To debug your macro I would suggest to use a long enough delay (such as 1s or 750ms) in the Wait actions to visibly follow every UI Interaction.
it works perfectly!!!
Thank you so muchh bro.
Could I ask you another question?
 

Dm114

Well-known member
hi bro, it's my new thread, could you answer please?
What thread are you speaking about?

If it's a thread where other users are already helping you, I generally don't interfere unless suggestions don't work and the solution seems simple enough to me...
 

Ayano

Member
What thread are you speaking about?

If it's a thread where other users are already helping you, I generally don't interfere unless suggestions don't work and the solution seems simple enough to me...
What thread are you speaking about?

If it's a thread where other users are already helping you, I generally don't interfere unless suggestions don't work and the solution seems simple enough to me...
take a look https://www.macrodroidforum.com/ind...le-that-increases-decreases-based-on-id.6445/
 
Top