giganut 109 Posted September 20, 2013 Report Share Posted September 20, 2013 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? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 20, 2013 Report Share Posted September 20, 2013 What is the bot doing on the inner loop?Also, try compiling the bot and see if it helps with the resource issue - it seems compiled bots run much better. Quote Link to post Share on other sites
giganut 109 Posted September 20, 2013 Author Report Share Posted September 20, 2013 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. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 20, 2013 Report Share Posted September 20, 2013 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. Quote Link to post Share on other sites
giganut 109 Posted September 20, 2013 Author Report Share Posted September 20, 2013 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. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 20, 2013 Report Share Posted September 20, 2013 When you look at the task manager are you seeing a ton of browser.exe's or is it saying that one browser.exe or ubot is taking up all the resources? Quote Link to post Share on other sites
giganut 109 Posted September 20, 2013 Author Report Share Posted September 20, 2013 There are five browser.exe running when I run the bot. Do you know how to reduce the amount of browser.exe running? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 20, 2013 Report Share Posted September 20, 2013 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. Quote Link to post Share on other sites
giganut 109 Posted September 20, 2013 Author Report Share Posted September 20, 2013 Ok thanks, I will give that a run and see if it that helps on my over night test of the bot. Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted September 20, 2013 Report Share Posted September 20, 2013 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") } }} Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted September 20, 2013 Report Share Posted September 20, 2013 This one will work too, depends what you're doing. loop while($both(#var C = 0, #var A <= #var ) { comment("Scrape")} Quote Link to post Share on other sites
giganut 109 Posted September 20, 2013 Author Report Share Posted September 20, 2013 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 ) { comment("Scrape")} Thank you for your replay, this is kinda what I am doing already but the scrap is in a loop while also. 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.