Jump to content
UBot Underground

Repeating a list


Recommended Posts

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

Link to post
Share on other sites

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

Link to post
Share on other sites
  • 7 years later...

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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 {
            }
        }
    }
}
  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...