Jump to content
UBot Underground

How to stop a loop


Recommended Posts

I have my bot open X amount of threads. I have an if then statement if a certain element appears. I want the loop to stop if the if statement is true, instead of continueing the rest of the loop, then re-loop.

 

Is this possible?

Link to post
Share on other sites

I'm not really getting how this define function/command and return command works.

 

Lets say my code is something like this

 

Main thread:

 

loop 9999

 

do action

 

if b = 1

then stop and re-loop

else continue

 

do action

 

if b = 1

then stop and re-loop

else continue

 

etc

 

Monitor thread

 

loop 9999

 

do action

 

scrape word

 

set a to scraped word

 

if var a = this

then

do action

set var b = 1

wait 15 seconds

else continue

 

 

 

This is what I am trying to accomplish.

Link to post
Share on other sites

Work from the inside out when building your loops. I would use a checkbox in the UI, and instead create a loop while the checkbox is true.

 

The way you use a define is by calling the define something relevant to the function.

 

then reading the junk above would look more like:

 

loop while

 

define scrape_urls_if_true

define set_variable_false

 

something like that.

 

When you are coding there are 2 parts to it. The functions and the functionality. Keep them separate.

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