affilategod 0 Posted March 20, 2014 Report Share Posted March 20, 2014 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? Quote Link to post Share on other sites
pftg4 102 Posted March 21, 2014 Report Share Posted March 21, 2014 yeah return breaks loop Quote Link to post Share on other sites
Ptrick125 45 Posted March 21, 2014 Report Share Posted March 21, 2014 You can use an $if command and then put the loop inside of the "then" area. Quote Link to post Share on other sites
affilategod 0 Posted March 23, 2014 Author Report Share Posted March 23, 2014 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 = 1then stop and re-loopelse continue do action if b = 1then stop and re-loopelse continue etc Monitor thread loop 9999 do action scrape word set a to scraped word if var a = thisthendo actionset var b = 1wait 15 secondselse continue This is what I am trying to accomplish. Quote Link to post Share on other sites
the_way 52 Posted March 25, 2014 Report Share Posted March 25, 2014 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_truedefine set_variable_false something like that. When you are coding there are 2 parts to it. The functions and the functionality. Keep them separate. 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.