Psychotix 0 Posted February 5, 2011 Report Share Posted February 5, 2011 Ok so im still trying to figure out how to I tell the cylons(bots) to do an action for every 50th loop? Do i use IF 50, 100, 150 so on? That gets messy because i have bots doing loops in the thousands. What I want is basically make it do an action depending on what I tell it. Whether every 20th, 50th 100th etc. Specifically I want the bot to post only X amount of post per blog>> log out>> change account>>log in>> post the rest. Tnx Quote Link to post Share on other sites
UBotBuddy 331 Posted February 5, 2011 Report Share Posted February 5, 2011 What about a Loop inside of another Loop? Quote Link to post Share on other sites
Psychotix 0 Posted February 6, 2011 Author Report Share Posted February 6, 2011 How do you mean? I cant quite picture it. Quote Link to post Share on other sites
UBotBuddy 331 Posted February 6, 2011 Report Share Posted February 6, 2011 http://screencast.com/t/OYwOjFOj That is what I mean. The outer loop executes 100 times and the inner loop executes 25 time. This means what ever is inside of the inner loop would be executed 2500 times. Quote Link to post Share on other sites
Net66 54 Posted February 7, 2011 Report Share Posted February 7, 2011 You could do an evaluation of whether the iteration of the loop you are on when divided by 50 is equal to the integer value of the same calculation. Andy Quote Link to post Share on other sites
Psychotix 0 Posted February 7, 2011 Author Report Share Posted February 7, 2011 Wow I just dont understand haha.Anyway thank you guys. I'll do a bot following this logic and maybe something clicks for me. Edit: ok im starting to get it. If I have a thousand sites to visit for example, and i want it to post 50 times per site, the main loop is only 20. Ingenius! Quote Link to post Share on other sites
JohnB 255 Posted February 7, 2011 Report Share Posted February 7, 2011 Here is the easy way. set a variable outside the loop to 50. At the end of the loop use a dec node and decrement that variable by one. After 50 cycles your variable will be 0. Inside the loop use an if/then statement to evaluate that variable: i.e. if #variable = 0 then do something AND set variable to 50 again. Make sense? John Quote Link to post Share on other sites
Psychotix 0 Posted February 9, 2011 Author Report Share Posted February 9, 2011 I managed to get the earlier recommendations by Botbuddy and Net66, but yeah tnx for that John. I can think of one application where decrementing to zero initiates an action can be useful! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.