JohnB 255 Posted September 4, 2010 Report Share Posted September 4, 2010 I have a bot out that posts ads to hundreds of sites. In the loop the posting goes through the list of ads. The problem is, how do I get it to start at the beginning of the list again when all ads are posted? Example: There are 500 sites but only 15 ads. After ad #15 is posted I want it to go back to #1 (0) again. Thanks John Quote Link to post Share on other sites
JohnB 255 Posted September 5, 2010 Author Report Share Posted September 5, 2010 Oh yeah. The list is using the $List Item function where list position is set to 0 outside the loop and inc at the end of the loop. Quote Link to post Share on other sites
MiriamMB 63 Posted September 5, 2010 Report Share Posted September 5, 2010 increment the list position (you're already doing that) you would then use the if then else command, with an evaluate command. if list position of the list is = to 15, then set list position to zero Quote Link to post Share on other sites
JohnB 255 Posted September 5, 2010 Author Report Share Posted September 5, 2010 Great! Thank you. Quote Link to post Share on other sites
hare ram 23 Posted June 23, 2018 Report Share Posted June 23, 2018 Hello i am also facing this issues in multithreading while i have a list of 100 link and i want to run these link in 50000 loops when a list starts from 0 to 99 again i want these list that start from 0 and so on until this not ends loop 50000.Plz explain in deatils or write a simple example.. Thanks in advance Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 29, 2018 Report Share Posted June 29, 2018 Hello i am also facing this issues in multithreading while i have a list of 100 link and i want to run these link in 50000 loops when a list starts from 0 to 99 again i want these list that start from 0 and so on until this not ends loop 50000.Plz explain in deatils or write a simple example.. Thanks in advance You can just use the set list position command and set it to be 0. Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 i already used that but fails to work i want only to increment all list again and again while loops not completed in multithreading. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 29, 2018 Report Share Posted June 29, 2018 i already used that but fails to work i want only to increment all list again and again while loops not completed in multithreading. If that's not working then just use the list item function and increment that, when it gets to be the same as the list total, then set it back to 0. Quote Link to post Share on other sites
hare ram 23 Posted June 29, 2018 Report Share Posted June 29, 2018 can you set an small example? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 29, 2018 Report Share Posted June 29, 2018 can you set an small example? Here you go: DoWork() define DoWork { comment("Note that stuff in here is local for threading") set(#_listItemNum,0,"Local") add list to list(%_numbers,$list from text("1,2,3,",","),"Delete","Local") loop(7) { alert($list item(%_numbers,#_listItemNum)) comment("Because its local we don\'t use increment here but math instead") set(#_listItemNum,$add(#_listItemNum,1),"Local") if($comparison(#_listItemNum,">= Greater than or equal to",$list total(%_numbers))) { then { set(#_listItemNum,0,"Local") } else { } } } } 1 Quote Link to post Share on other sites
hare ram 23 Posted July 3, 2018 Report Share Posted July 3, 2018 Thanks.. 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.