Random value for gesture function

Didar

Member
Hello guys. I asked this about a year ago. I don't know if it is implemented after this time. what if for example, I want to click somewhere random between x:10 to x:20 and y:10 to y:20. or another function like swipe speed. can we make the ms time random?
 

420

Active member
Hello guys. I asked this about a year ago. I don't know if it is implemented after this time. what if for example, I want to click somewhere random between x:10 to x:20 and y:10 to y:20. or another function like swipe speed. can we make the ms time random?
this does not seem to be an option in the gesture action itself, you could however create your own "random" swipe duration, by doing something like this;

set (integer) variable - random 1-3
if variable = 1 - run gesture action with 50ms duration
else if variable = 2 - run gesture action with 100ms duration
else if variable =3 - run gesture with 150 ms duration
end if

it doesn't have to be just 3 options, you can ofcourse create as many different options as you want, and set the ms to whatever you want also.

it will be a bit of work if you want lots of different "random" options, but if it is important to you it can be done!
 

420

Active member
Hello guys. I asked this about a year ago. I don't know if it is implemented after this time. what if for example, I want to click somewhere random between x:10 to x:20 and y:10 to y:20. or another function like swipe speed. can we make the ms time random?
sorry, i overlooked your other question but yes clicking at a random position can also be done, something like this;

set (integer) Y variable - random 10-20
set (integer) X variable - random 10-20
Ui interaction - click - x,y location - click the 3 dots next to the x/y field to choose your integer variables as x/y values
 

Didar

Member
In the next version, the swipe gesture will support variables. So this will be possible by setting variable to random values.
oh cool. thanks. waiting to see that ^^
so only swipe will support variables? or everything else also? because I also need a single click on a random position for example in a space between a square in 0,0 and 10,10. my whole purpose is to prevent others to know that we are bots or humans. so every swipe or click should be on a random point around the location we choose.
 

420

Active member
oh cool. thanks. waiting to see that ^^
so only swipe will support variables? or everything else also? because I also need a single click on a random position for example in a space between a square in 0,0 and 10,10. my whole purpose is to prevent others to know that we are bots or humans. so every swipe or click should be on a random point around the location we choose.
i don't know about "everything else" but the Ui interaction - (single) click action already supports variables, like the example i gave above.
 

Didar

Member
oh yea/. my version is older and does not have it. so it's sensible and it might be easy to implement those three dots on every function for the developer. I hope he does that :)
 

Didar

Member
sorry, i overlooked your other question but yes clicking at a random position can also be done, something like this;

set (integer) Y variable - random 10-20
set (integer) X variable - random 10-20
Ui interaction - click - x,y location - click the 3 dots next to the x/y field to choose your integer variables as x/y values
I tried this. it works well. now I just dunno how to loop it and click for example 10 times. it seems the loop does not work well here. it works once and then some glitch. I even put a wait but still nothing. what do you think?
1627735630815.png
 

420

Active member
I tried this. it works well. now I just dunno how to loop it and click for example 10 times. it seems the loop does not work well here. it works once and then some glitch. I even put a wait but still nothing. what do you think?
View attachment 730
i'm sorry but i don't really know what to think, i have limited experience with Ui interaction..

i recreated this (without the wait action) and it seems to be working fine for me, when i look at the log, it shows that it has ran 10 times. i'm not seeing the clicks actually doing anything, but that could just be because there is nothing to click (for me) on those x/y coordinates, i really don't know.... what does your log say?
 

Attachments

  • Screenshot_20210731-162147.png
    Screenshot_20210731-162147.png
    409 KB · Views: 11

Didar

Member
i'm sorry but i don't really know what to think, i have limited experience with Ui interaction..

i recreated this (without the wait action) and it seems to be working fine for me, when i look at the log, it shows that it has ran 10 times. i'm not seeing the clicks actually doing anything, but that could just be because there is nothing to click (for me) on those x/y coordinates, i really don't know.... what does your log say?
thank you. well, I did not know that we have log haha. now I checked it and it's fine as you say. the thing is that it should click a button in an app but it clicks it once. I guess some limitations from the app? maybe I should increase the wait :/
 

420

Active member
thank you. well, I did not know that we have log haha. now I checked it and it's fine as you say. the thing is that it should click a button in an app but it clicks it once. I guess some limitations from the app? maybe I should increase the wait :/
yeah, maybe it is just going to fast, so you should try a longer wait action, hopefully that will fix it.
 

Dm114

Well-known member
I tried this. it works well. now I just dunno how to loop it and click for example 10 times. it seems the loop does not work well here. it works once and then some glitch. I even put a wait but still nothing. what do you think?
View attachment 730
1⁰) Your 'Wait 10 ms' is far to short for you to see anything. Depending on what you need, try at least 500 ms (half a second) for instance
2⁰) I would put it at the end of the loop instead of at the beginning.
 

Didar

Member
1⁰) Your 'Wait 10 ms' is far to short for you to see anything. Depending on what you need, try at least 500 ms (half a second) for instance
2⁰) I would put it at the end of the loop instead of at the beginning.
it worked well with 30m
 
Top