Jump to content
UBot Underground

Loop While In A Loop While


Recommended Posts

I have a need to run a Loop While In A Loop While but when I do the bot seems to slowly increase in it's resources consumption, and eventually making the bot freeze up, so my question is dose anyone know a way to make a regular loop behave like a loop while?

Link to post
Share on other sites

The first loop while is set to run on an infinite loop, as long as the variable is set to zero. The second loop while inside of the first scrapes users names as long as one variable is grater than or equals to another variable , this works fine until the bot has been running for about 6hr then the bot starts to use to much resources.

Link to post
Share on other sites

It's probably making a list that is too large for Ubot to handle. Ubot and large lists don't work too well. You can add the results into a database instead which would take the load off Ubot and have your bot running much more smoothly. If you need to run on a local database for yourself only you can setup something like wamp server, if you need to sell the bots compiled you can check out Aymens sqlite plugin.

Link to post
Share on other sites

I am sure that would help the bot run much better, but it happens even when there is a relatively small list also, like 150 user names or so, because the bot runs on a infinite loop there is no need to grab large list because the bot will just go back and grab more user name for the given keyword every time the user name list is depleted.

Link to post
Share on other sites

You might have to use the close page command after so many loops - see if that helps.

 

I just did a little test just to make sure - the first time I had a small program loop 10 times and the browser ended up at 131k at the end of the 10 loops.

 

Looping twice at 5 inner loops each with a close page command (after the inner loop of 5) got the browser up to 105k and then 91k so as you can see it should help.

Link to post
Share on other sites

Try something like this or variation of...

 

 

loop while($comparison(#var C"=", 0)) {
    if($comparison(#var A"<="#var B)) {
        then {
            comment("Scrape")
        }
        else {
            comment("Do something else")
        }
    }
}

Link to post
Share on other sites

Try something like this or variation of...

 

 

loop while($comparison(#var C"=", 0)) {

    if($comparison(#var A"<="#var B)) {

        then {

            comment("Scrape")

        }

        else {

            comment("Do something else")

        }

    }

}

 

This one will work too, depends what you're doing.

 

loop while($both(#var C = 0, #var A <= #var B)) {

    comment("Scrape")

}

 

 

Thank you for your replay, this is kinda what I am doing already but the scrap is in a loop while also.

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...