Praney Behl 314 Posted June 16, 2010 Report Share Posted June 16, 2010 Hi Seth, and Guys and Gals, I am starting this thread for Muti-Threading, A little help needed here. I have a question with threading. I have been playing with the thread command and really couldn't get to know how to effective use it. Is it possible use run multiple browsing tasks simultaneously, if yes would please be explain and/or demonstrate it. If not will it be possible at all. Basically what I am trying to do is for example let us say an account creation bot, say if I want you make 10 accounts, you know Ubot goes one at a time, but I am wondering if using the thread command it could work may be on multiple tabs you know. I have tried making a sub for account creation which runs fine by itself and then I tried to put is in a thread and then it just jumps of and the script stops. Whereas, if i put anything else that doesn't need browsing into a loop with a certain delay and throw it in a thread it works great, for example running CCleaner periodically. I would really really appreciate a good explanation/understanding of this THREAD Command . If you want to pm me or start a new thread about it would be awesome, or maybe I can start a thread. Thanks, Praney Quote Link to post Share on other sites
Seth Turin 223 Posted June 16, 2010 Report Share Posted June 16, 2010 so, the way the thread command works is simply to put any commands you want run in a separate thread inside the thread command. please keep in mind that this command was created to solve a problem with dialog windows, and other uses of it have not been thoroughly tested. that said, you should be able to use the "in sub window" command inside a thread, which will, in theory. give you any number of browsers simultaneous, from which you can do anything you want. also keep in mind that the browsers will share their cookie state, so you couldn't make accounts on the same site. another caveat is that browser take a tremendous amount of resources, so opening to many will lag your computer. Quote Link to post Share on other sites
Praney Behl 314 Posted June 16, 2010 Author Report Share Posted June 16, 2010 Thanks Seth, you should be able to use the "in sub window" command inside a thread, which will, in theory. give you any number of browsers simultaneous, from which you can do anything you want. In theory it should work, thats what I thought but I have tries to run a thread in sub window and vise versa but it just goes blank. Thats why I am still scratching my head. Well its a lil late here in Aus. 5 am feeling sleepy will try other thing with it tomorrow. Thank for that, Praney Quote Link to post Share on other sites
Praney Behl 314 Posted July 6, 2010 Author Report Share Posted July 6, 2010 Hi all,Please mods, admins, and advanced users, correct me if I am wrong.I hope that I am wrong.Of what I have experienced with Threads is that anything you put in a thread is only going to execute the first command in the thread and then the thread dies off.. unfortunately.. its not like programming in .NET or similar where you can run multiple commands using multiple threads working simultaneously.. But with Ubot my experience is as stated above. Sample: Using threading sample For example, I made a sample script to demonstrate it..This script tries to start 3 threads all in sub window, tries to navigate to 3 different websites(i.e.more than 1 task. We run the script it tries to open three sub-windows, then 1 or 2 windows crashes and close and the other/s only browse to the first website and stop. No second command or process is executed.. I would strongly like to request an introduction to proper threading/multi-threading feature into UBot Studio will permit user and developers to reach new heights. Please the GURUS out there correct me if I am wrong. Praney Quote Link to post Share on other sites
afallison 0 Posted July 8, 2010 Report Share Posted July 8, 2010 i have also been trying to get this figured out. i attempted to create a mailer using multiple threads but it didn't work correctly. if anything it was still single threaded because it would still send 1 at a time. it could be that i was not using it correctly. any info from the big guys would be very helpful. but as i'm typing this, i had a thought. does the bot need to be compiled first before multiple threads will function correctly? EDIT: by mailer i meant i was using the built in send email function inside ubot with my own smtp server information, not webmail. Quote Link to post Share on other sites
Praney Behl 314 Posted July 8, 2010 Author Report Share Posted July 8, 2010 Hey afallison, I have tried compiling the bot all is still the same - still only processes 1 line of code only.. The big guys are quite I don't why but seems like no one wanna respond to this.. I am still waiting for seth's reply on this... Praney Quote Link to post Share on other sites
alcr 135 Posted July 8, 2010 Report Share Posted July 8, 2010 Well, you would have to have a delay in the script which waits for the thread to finish. Thats why only one is being runned Quote Link to post Share on other sites
afallison 0 Posted July 8, 2010 Report Share Posted July 8, 2010 i thought the point of threads was to run them at the same time, not to wait for another thread to finish and then move onto the next one. could you possibly post a screen shot of what you're talking about? i thought with threads you could take an existing bot, add 10 threads and essentially copy the original bot 10x into those threads and hit run. then your bot is basically running 10x instead of just once. correct me if i'm wrong. here is a screenshot of what i was thinking about:http://img684.imageshack.us/img684/4567/emaillv.jpg Quote Link to post Share on other sites
alcr 135 Posted July 8, 2010 Report Share Posted July 8, 2010 Yes, but if the mainthread with all the threads in it runs out, then all the threads started will shutdown. Quote Link to post Share on other sites
Praney Behl 314 Posted July 9, 2010 Author Report Share Posted July 9, 2010 Yes, but if the mainthread with all the threads in it runs out, then all the threads started will shutdown. Thanks ALCR,Thats a great tip. But I tried to put a 50sec delay at the end of my sample script above and all the 4 sub open, the first 3 just say at google but the last i.e. 4th window actually starts working and navigates to all the websites and when done shuts down that is exactly what I want it to do. I believe it is the delay but trying to fix this;if I put a delay after every thread, then it will work BUT all the 4 sub-window will not open and work simultaneous(Multi-Threading). Any tips how is that possible? Cheers, Praney Quote Link to post Share on other sites
alex 1 Posted July 12, 2010 Report Share Posted July 12, 2010 Yah, it would be very very helpfull if we had an real multithread support in ubot, please let our dreams become true Quote Link to post Share on other sites
Praney Behl 314 Posted July 17, 2010 Author Report Share Posted July 17, 2010 New Update: I tried as ALCR said, tried to give the main window some more execution time than the sub-window. I have attached the sample script. But still only one window works at a time.. Really upset Praney Quote Link to post Share on other sites
Net66 54 Posted July 17, 2010 Report Share Posted July 17, 2010 As far as I can tell ubot has never been built to multi-thread. The 'thread' command was introduced to work-around one particular issue. I suspect Seth is probably kicking himself for calling the command "thread" now even if that is kind of what it does. Andy Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted July 17, 2010 Report Share Posted July 17, 2010 It should be named "thread for dialog" or something else so new users will not keep asking the same question.. Quote Link to post Share on other sites
Praney Behl 314 Posted July 19, 2010 Author Report Share Posted July 19, 2010 LOL I got it guys, But I wish there was it had that functionally. Praney 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.