jamesfar 15 Posted August 5, 2014 Report Share Posted August 5, 2014 Hi James. I converted the example from the thread you posted.I also removed some of the stuff that was in the script that is not directly required to get the job done: So here's the ThreadPlugin Version. Create Lists()plugin command("Smartthreads.dll", "Thread control normal", "codeprocedure", $list total(%List1), 5, "No")define codeprocedure(#counter) { add list to list(%local break down, $list from text($list item(%List1, #counter), ","), "Don\'t Delete", "Local") set(#VariableA, $list item(%local break down, 0), "Local") set(#VariableB, $list item(%local break down, 1), "Local") set(#VariableC, $list item(%local break down, 2), "Local") add item to list(%recompile, "{#VariableB},{#VariableC},{#VariableA}", "Don\'t Delete", "Global")}define Create Lists { clear list(%List1) clear list(%recompile) add list to list(%List1, $list from text("A,26,zB,25,yC,24,xD,23,wE,22,vF,21,uG,20,tH,19,sI,18,rJ,17,qK,16,pL,15,oM,14,nN,13,mO,12,lP,11,kQ,10,jR,9,iS,8,hT,7,gU,6,fV,5,eW,4,dX,3,cY,2,bZ,1,a", $new line), "Don\'t Delete", "Global")} Let me know if there are any questions. PS: Writing to a ubot global list from within threads doesn't work 100% reliable all the time. I highly recommend to use large data plugin for this job. Dan Have you try it before posting Dan? Because it produce different result http://www.ubotstudio.com/forum/index.php?/topic/10042-new-v4-tutorial-multi-threading-example/page-2&do=findComment&comment=73972 >>> from 26 source data it produce 26 result. Correct Your code : from 26 source produce only 8 result. Sometimes produce only 25 result. Sometimes produce correct 26 result Here are videos from my screen for the result of your code Dan : http://screencast.com/t/9IpKJwzwcFIE Team Viewer available if you would like to check Please let me know I also try using sqlite plugin as Database storage and when all data processed the threads are not going down. Seems to stuck Quote Link to post Share on other sites
Bot-Factory 602 Posted August 5, 2014 Report Share Posted August 5, 2014 Have you try it before posting Dan? Because it produce different result http://www.ubotstudio.com/forum/index.php?/topic/10042-new-v4-tutorial-multi-threading-example/page-2&do=findComment&comment=73972 >>> from 26 source data it produce 26 result. Correct Your code : from 26 source produce only 8 result. Sometimes produce only 25 result. Sometimes produce correct 26 result Please let me know I also try using sqlite plugin as Database storage and when all data processed the threads are not going down. Seems to stuck Real man don't test code! They just run it.... Seriously.... you need some background know how to understand this issue. This problem is related to global lists and global variables.If you try to write or increment them at the same time from multiple threads, you will run into issues. You could call it "they are not thread safe". So the faster your script / your threads run, there more likely it is that you will see this problem. That is the reason why some people think there is no problem. If you run a browser based bot with 5 threads in parallel where each thread needs a couple of seconds to finish, you will not see that issue. But if you scrape 1 Million urls with http plugin then you will know what I mean. So the reason the other script "works" is just because there is some additional stuff in the script. Going through multiple defines, adding some in new browser commands.Stuff that is not required for what the script is supposed to do. It's just an example. So the reason why it's working is because it executes slower because of the other stuff. But both scripts are just an example of the structure. They are nothing you would use in the real world. Sorting list items can be done without threading. PM me if you have more questions about that topic. Don't want to hijack the thread here. Dan Quote Link to post Share on other sites
jamesfar 15 Posted August 5, 2014 Report Share Posted August 5, 2014 Real man don't test code! They just run it.... Seriously.... you need some background know how to understand this issue. This problem is related to global lists and global variables.If you try to write or increment them at the same time from multiple threads, you will run into issues. You could call it "they are not thread safe". So the faster your script / your threads run, there more likely it is that you will see this problem. That is the reason why some people think there is no problem. If you run a browser based bot with 5 threads in parallel where each thread needs a couple of seconds to finish, you will not see that issue. But if you scrape 1 Million urls with http plugin then you will know what I mean. So the reason the other script "works" is just because there is some additional stuff in the script. Going through multiple defines, adding some in new browser commands.Stuff that is not required for what the script is supposed to do. It's just an example. So the reason why it's working is because it executes slower because of the other stuff. But both scripts are just an example of the structure. They are nothing you would use in the real world. Sorting list items can be done without threading. PM me if you have more questions about that topic. Don't want to hijack the thread here. Dan PM Sent Dan Quote Link to post Share on other sites
kev123 132 Posted August 5, 2014 Author Report Share Posted August 5, 2014 Have you try it before posting Dan? Because it produce different result http://www.ubotstudio.com/forum/index.php?/topic/10042-new-v4-tutorial-multi-threading-example/page-2&do=findComment&comment=73972 >>> from 26 source data it produce 26 result. Correct Your code : from 26 source produce only 8 result. Sometimes produce only 25 result. Sometimes produce correct 26 result Here are videos from my screen for the result of your code Dan : http://screencast.com/t/9IpKJwzwcFIE Team Viewer available if you would like to check Please let me know I also try using sqlite plugin as Database storage and when all data processed the threads are not going down. Seems to stuckjust use the large table plugin it was built to fix this issue with ubot normal lists Quote Link to post Share on other sites
Bot-Factory 602 Posted August 6, 2014 Report Share Posted August 6, 2014 Feature Request: There is one thing I currently can't do with the plugin. Breakdown a large list and run commands in between threads. So let's say I have a list with 1Million urls. No the smartthread plugin can loop through that list perfectly. But if I want to do something every 5000 or every 5000 threads, I can't do that. So I would like to have an optionfor standard and advanced mode:run in between definerun every N threadsfinish all threads before run (YES/NO). So I set that to 500 and select YES.The plugin should run 500 threads. Waits until all of them are finished. Then execute the in between define. Then run the next 500 threads. If finish is set to NO, the plugin would just launch the in between define as a regular thread every 500 threads. This could be used to update statmons for example or write to log files and so on. That's really the only thing I'm currently missing. Other than that the plugin is a real time saver!!! Thanks for making it available.Dan Quote Link to post Share on other sites
Bot-Factory 602 Posted August 6, 2014 Report Share Posted August 6, 2014 Little TIP: If you want to update a statmon, you could run that in a separated thread: define UpdateStatmon { loop while($comparison($plugin function("Bigtable.dll", "Large list total", "status"), "!=", $plugin function("Bigtable.dll", "Large list total", "orderids"))) { set(#status, "Extracted {$plugin function("Bigtable.dll", "Large list total", "status")} from {$plugin function("Bigtable.dll", "Large list total", "orderids")}", "Global") wait(1) }} And launch that with advanced thread control:plugin command("Smartthreads.dll", "Thread control Advanced add", "UpdateStatmon", "Loop Number", 1, "No") And at the beginning of your mean thread you add:set(#date, $plugin function("Bigtable.dll", "Large list item", "datelist", #counter), "Local") You could also update the global variable directly of course. But that's not so clean. Because depending on which thread runs when, the counter might jump up and down sometimes. Which will look a little bit odd for users. Or use an increment. But as you know.. this could miss some increments if the commands runs at the same time. So also not very clean in my easy. Just if someone says my idea is to complicated :-) CheersDan Quote Link to post Share on other sites
whoami 26 Posted August 6, 2014 Report Share Posted August 6, 2014 Can I use this with HTTP Post plugin? Quote Link to post Share on other sites
kev123 132 Posted August 6, 2014 Author Report Share Posted August 6, 2014 Can I use this with HTTP Post plugin?yes Quote Link to post Share on other sites
kev123 132 Posted August 6, 2014 Author Report Share Posted August 6, 2014 Little TIP: If you want to update a statmon, you could run that in a separated thread: define UpdateStatmon { loop while($comparison($plugin function("Bigtable.dll", "Large list total", "status"), "!=", $plugin function("Bigtable.dll", "Large list total", "orderids"))) { set(#status, "Extracted {$plugin function("Bigtable.dll", "Large list total", "status")} from {$plugin function("Bigtable.dll", "Large list total", "orderids")}", "Global") wait(1) }} And launch that with advanced thread control:plugin command("Smartthreads.dll", "Thread control Advanced add", "UpdateStatmon", "Loop Number", 1, "No") And at the beginning of your mean thread you add:set(#date, $plugin function("Bigtable.dll", "Large list item", "datelist", #counter), "Local") good work not 100% how it all ties together but already have my own ideas. I may add the ability to set threads as backgroundworker basically what this means is the thread/s you set to this status will run until the "main threads" have completed and auto shutdown thus making simple anything like this and ensuring they close Quote Link to post Share on other sites
Bot-Factory 602 Posted August 9, 2014 Report Share Posted August 9, 2014 Feature Request: Stop all threads command. Quote Link to post Share on other sites
jamesfar 15 Posted August 14, 2014 Report Share Posted August 14, 2014 today suddenly i got smartthreads.dll detected as a virus by avira anyone has the same situation ? http://screencast.com/t/7VswnHnVPyh Quote Link to post Share on other sites
Bot-Factory 602 Posted August 14, 2014 Report Share Posted August 14, 2014 today suddenly i got smartthreads.dll detected as a virus by avira anyone has the same situation ? http://screencast.com/t/7VswnHnVPyh Antivir is the only AV that shows that: So 1 out of 54 AV scannershttps://www.virustotal.com/en/file/b3d02f68b42195721268a665d1ba92e61370c9715372e2f8a27a7ae22b7bf9d3/analysis/1408017485/ So I would say: False positive. Add it to the whitelist and you are good to go. CheersDan Quote Link to post Share on other sites
kev123 132 Posted August 14, 2014 Author Report Share Posted August 14, 2014 Antivir is the only AV that shows that: So 1 out of 54 AV scannershttps://www.virustotal.com/en/file/b3d02f68b42195721268a665d1ba92e61370c9715372e2f8a27a7ae22b7bf9d3/analysis/1408017485/ So I would say: False positive. Add it to the whitelist and you are good to go. CheersDanyes false positive because the plugin is encrypted. Wont cause a issue when bots are compiled or be present. Quote Link to post Share on other sites
kev123 132 Posted August 14, 2014 Author Report Share Posted August 14, 2014 From next week the plugin will be going to full price get in while you can at this price. Quote Link to post Share on other sites
giganut 109 Posted August 30, 2014 Report Share Posted August 30, 2014 Just grabed it, thanks kev Quote Link to post Share on other sites
dankass 52 Posted August 30, 2014 Report Share Posted August 30, 2014 Labor day weekend sale? Quote Link to post Share on other sites
kev123 132 Posted August 30, 2014 Author Report Share Posted August 30, 2014 Labor day weekend sale? The price was meant to go up to full. i'll hold at the current discount price until next week Quote Link to post Share on other sites
MMD 7 Posted August 30, 2014 Report Share Posted August 30, 2014 Just grab it before price go up :3 Quote Link to post Share on other sites
drhum 3 Posted August 30, 2014 Report Share Posted August 30, 2014 That could be worth the gamble. But is there any way that the price will still stay the same for a month? Quote Link to post Share on other sites
kev123 132 Posted August 30, 2014 Author Report Share Posted August 30, 2014 Update 1.1 Login to robobest.com to download the latest update (on the right hand side)use the login credentials you entered on purchase. If you have forgot them use the reset password link. Added: Thread control Items Processed This Gives a number for items processed, best used as part of a progress bar.example code ui stat monitor("processed", $plugin function("Smartthreads.dll", "Thread control Items Processed")) plugin command("Smartthreads.dll", "Thread control normal", "testing", 10, 3, "No") define testing(#row) { in new browser { wait(1) } } Smart thread stop This stops the threading process example code ui button("Start") { plugin command("Smartthreads.dll", "Thread control normal", "testing", 10, 3, "No")}ui button("Stop") { plugin command("Smartthreads.dll", "Smart thread stop")}define testing(#row) { in new browser { wait(1) }} Quote Link to post Share on other sites
kev123 132 Posted August 30, 2014 Author Report Share Posted August 30, 2014 That could be worth the gamble. But is there any way that the price will still stay the same for a month? sorry price going up next week Quote Link to post Share on other sites
kev123 132 Posted September 11, 2014 Author Report Share Posted September 11, 2014 held off for a while to give everyone a fair chance price now increased. Quote Link to post Share on other sites
Bot-Factory 602 Posted September 11, 2014 Report Share Posted September 11, 2014 held off for a while to give everyone a fair chance price now increased. Still a very useful and great plugin. Even for the regular price. Makes threading so much easier. I use it in all my bots now.Dan 1 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted September 11, 2014 Report Share Posted September 11, 2014 I slid in safe!!!! I can't wait to get my hands dirty with this one too!! Thanks Kev!! TC Quote Link to post Share on other sites
Black Automation 20 Posted September 28, 2014 Report Share Posted September 28, 2014 Well just grabbed my copy.Thanks. 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.