Jump to content
UBot Underground

A good way to end threads if slow proxy, ect.


Recommended Posts

Hey, I was wondering if there's a good clean way to end a thread if it's connected to a slow proxy and at some point it just isn't loading anything at all or fast enough.  I know I can do an if then statement (ie. if element exist, then continue with thread - putting all the rest of the commands inside the then statement - else do nothing.  

 

The problem with this is that I will have so many if then statements inside each other because I will want to check every time it's supposed to load a page.  This is getting messy an confusing me when I try to trouble shoot bugs.  It would just be easier if a command existed that just said end thread now, screw all the other crap after this, just quit while you're ahead and start over with a new thread and a new browser window.  

 

I'm finding that while my proxies are pretty good, often somewhere in the middle of a thread it won't load a page and then it just takes forever to finish the thread isn't loading.  This is slowing down the speed of my bots.  Any good solutions for this?

 

Thanks!

Link to post
Share on other sites

Put it inside a loop while with a comparison in the while to a variable that you manipulate with your IF exists or anything like that within...

 

LOOP WHILE($comparison(#something,"<",#exit) {

   IF($exists(something to check on page here) {

    THEN {

 

     Do whatever you normally do, HERE

 

    }

    ELSE {

      SET(#something, #exit, "Global")

    }

  }

}

 

The above ^^^ is quick pseudo-code (not UB code per se) for illustration of concept purposes only.

 

Once the code stops working (page error, whatever else you think of...) the comparison variable is given the exit value and the LOOP WHILE exits gracefully (you can close your thread there, whatever)...

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