WhiteHatBox
Share Page
Following(0)
Partner(s)
sturmundrang

Repeat subset of steps N times

ReplyThanks 2016/01/30 13:17:19 0 0

Hi, I would like to know if it's possible to have a bot repeat a subset of steps n times, then run from the beginning (loop through the subset).

In short, I need to login with one user, accomplish some tasks a number of times, then change username, repeat the tasks N times, and so on.

I am trying with the IF statement, but it gets quite convoluted and messy, plus not feasible for a large number of users.

Thanks

Aprilcaicai
2016/01/31 20:55:21

Hi, sturmundrang, botchief can do it. you need to use the Loop action or Goto action to realize what you want.

If there is any problem, please feel free to contact us. thanks

sturmundrang
2016/02/02 09:05:46

Hi, thanks, I am using the Goto action, but it lacks a very important feature, which is how many times it should go to that specific step. I need to loop through the subset N times, not infinite times.


Which command do you mean with LOOP? The wait(loop) command or the table loop command?

With the wait command I only get sleep time and cycle timeout, how can I use them?

With table loop: how to use it? Isn't this to just loop through a set of data for variables?

Thanks


WhiteHatBox
2016/02/02 12:43:30

You can use a simple way to do this with goto or loop action.

1. Create a number variable

2. add 1 to the variable in the loop every time.

3. use if action to judge if the variable reach certain number, then just jump loop.

Let's ROCK!
sturmundrang
2016/02/02 12:48:27

Thanks yes I was going through this http://whitehatbox.com/bbs/BBSPost?postid=1057&searchText=wait%20action#.VrC4U-bApf0


but it does not work, I fail the on false check, I am unable to create the A=A+1 variable count using the commands. It tells me value input error...

sturmundrang
2016/02/02 13:05:56
Ok I got it to work....but just for the first loop. I set the bot to go to the first action on true, but then when it enters the wait loop action it considers it always true...while I am writing this I am considering that it may store the onfalse check variable so tthat the if statement is always true....while it should discard it at each end loop. How do I do that?
WhiteHatBox
2016/02/03 02:28:58
send me your bot file here, I will fix it for you.
Let's ROCK!
sturmundrang
2016/02/03 10:58:25
Hi I sent it to [email protected] I cannot send files in PM
sturmundrang
2016/02/20 06:31:21

Hi, ok this is solved. I followed this thread http://www.whitehatbox.com/bbs/BBSPost?postid=1057&searchText=loop#.VshNUua8rfY


For those that wish the bot to run multiple sets of loops, you have to reset the variable after each loop. Just set a variable operate action with the check variable equal to zero or whatever you need. Following the example in the thread above, you set A = to zero. Place the variable operate action before your wait (loop) action and you are set to go.

If you do not do this, at the second set of loops the bot will still retain variable A = B, therefore the statement will be true, therefore it will only loop once per set.

Hope it helps.

sturmundrang
2016/02/20 12:31:07

Hi I am actually trying to go a step further. I am trying to have B change its max value at each loop. However, the comparison command only works for double (number) variable types, and this type of variable does not accept an array of values, only fixed values. Therefore I cannot tie a table with the number that should equal B per each loop. Therefore each time I have loop N times. This is kinda unnatural and leaves a footprint on site logs, which I have to avoid.

Any help?

<< < 12 > >>
VerifyCode
Advanced Option