General Lee 12 Posted August 20, 2012 Report Share Posted August 20, 2012 I'm trying to create a simple piece of code (at least that's what I thought) that will navigate to a url and view the page 100 plus times in something like 10 threads to make it fast. I've read TJ's thread listed here: http://www.ubotstudio.com/forum/index.php?/topic/10042-new-v4-tutorial-multi-threading-example/ 50 times and watched the video but I can't figure it out. Ugh... Quote Link to post Share on other sites
k1lv9h 76 Posted August 20, 2012 Report Share Posted August 20, 2012 Hi, This is a simple UBot thread example. Simple in that it just navigates to the sites in the list. Sample code:clear list(%urls) add list to list(%urls, $list from text("www.bonitrust.de www.bookfav.de www.bookler.de www.bookmark.raubfische.de www.bookmark.sitepro.cc www.bookmark-artikel.net www.bookmark-clever.de www.lookday.de www.markbook.de www.meine-bookmarks.info www.membre.de www.minota.de www.mybookmarks24.com", $new line), "Delete", "Global") ui stat monitor("total list", $list total(%urls)) ui stat monitor("urls processed", #urls processed) ui stat monitor("current thread", #used threads) set(#threads to run, 3, "Global") set(#used threads, 0, "Global") set(#urls processed, 0, "Global") loop while($comparison($list total(%urls), ">", #urls processed)) { loop while($comparison(#used threads, ">=", #threads to run)) { wait(1) } increment(#used threads) thread { in new browser { if($comparison($list position(%urls), "<", $list total(%urls))) { then { navigate($next list item(%urls), "Wait") wait for browser event("Everything Loaded", 30) increment(#urls processed) } else { } } decrement(#used threads) } } }sample-thread-control-001.ubot Kevin 1 Quote Link to post Share on other sites
General Lee 12 Posted August 22, 2012 Author Report Share Posted August 22, 2012 thanks man. Quote Link to post Share on other sites
Aymen 385 Posted October 4, 2012 Report Share Posted October 4, 2012 i don't think this works when you select one thread , does it ? Quote Link to post Share on other sites
Aymen 385 Posted October 6, 2012 Report Share Posted October 6, 2012 anyone can confirm this ? Quote Link to post Share on other sites
k1lv9h 76 Posted October 6, 2012 Report Share Posted October 6, 2012 Hi, Why wouldn't it? I tested the sample code with 1 thread and it work exactily the way it should. Kevin Quote Link to post Share on other sites
Aymen 385 Posted October 14, 2012 Report Share Posted October 14, 2012 because i tested it and it doesn't start working when you select one thread ! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 14, 2012 Report Share Posted October 14, 2012 set to 1 thread it will only open 1 thread in new browser and keep processing so should work without issue.. if 1 thread, i would reccomend if your going to multi thread a bot its use is for more then 1 otherwise use the main browser 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.