musician87 2 Posted July 24, 2013 Report Share Posted July 24, 2013 How I can run a particular command every X times? I mean:I have a list of urls to be visited and every X urls the bot should change the IP. I've set it like:if the current url visited is the number X then change IP, with the $comparison function. What I need is something like:If url visited is the number 5 or a multiple then change IP. So that the after the 5th url, there is an IP change, after the 10th there is an IP change and so on... Suggestions? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 24, 2013 Report Share Posted July 24, 2013 set variable 1loop list total urls{if(variable = X nunber)than change proxy set variable 1else increment variablenavigate list item} Quote Link to post Share on other sites
musician87 2 Posted July 24, 2013 Author Report Share Posted July 24, 2013 set variable 1loop list total urls{if(variable = X nunber)than change proxy set variable 1else increment variablenavigate list item} And this will change the IP every X urls right?I'm trying to add it to my project but I want to understand it first Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 24, 2013 Report Share Posted July 24, 2013 yes it will the above isn't actual code here is the actual code to use set(#temp, 5, "Global")loop($list total(%name)) { comment("change 5 in the comparison below to the number of urls you want to loop before it changes") if($comparison(#temp, ">=", 5)) { then { change proxy("None") set(#temp, 1, "Global") } else { increment(#temp) } }} This ensures it changes before first url.otherwise if you dont want to change on first set of urls, change the first set variable for temp to 1 1 Quote Link to post Share on other sites
musician87 2 Posted July 26, 2013 Author Report Share Posted July 26, 2013 yes it will the above isn't actual code here is the actual code to use set(#temp, 5, "Global")loop($list total(%name)) { comment("change 5 in the comparison below to the number of urls you want to loop before it changes") if($comparison(#temp, ">=", 5)) { then { change proxy("None") set(#temp, 1, "Global") } else { increment(#temp) } }} This ensures it changes before first url.otherwise if you dont want to change on first set of urls, change the first set variable for temp to 1It worked Thank you so much TJ! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 26, 2013 Report Share Posted July 26, 2013 np 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.