spa3212 1 Posted August 14, 2017 Report Share Posted August 14, 2017 I tried lot and but no use,,I could not make the bot multi threaded can anyone please help me.. below is my code..this is simple data picked from csv file..I tried code given http://network.ubotstudio.com/forum/index.php/topic/10042-new-v4-tutorial-multi-threading-example/ but all thread windows used same user details and login to yahoo from same row.. ui open file("Accounts",#GmailAccount)create table from file(#GmailAccount,&Gmailaccount)ui text box("Starting Point",#StartingPoint)set(#row,#StartingPoint,"Global")add list to list(%Use this proxy,$list from file(#proxy),"Delete","Global")ui open file("Proxy Details Format Proxy:Port",#proxy)ui stat monitor("Working on Row No.",#row)loop($table total rows(&Gmailaccount)) { navigate("https://mail.yahoo.com/","Wait") wait for browser event("Everything Loaded","") type text(<username field>,$table cell(&Gmailaccount,#row,0),"Standard") click(<login button>,"Left Click","No") wait for browser event("Everything Loaded","") wait for element(<password field>,"","Appear") type text(<password field>,$table cell(&Gmailaccount,#row,1),"Standard") wait for browser event("Everything Loaded","") click($element offset(<login button>,0),"Left Click","No") alert("Work done..") increment(#row)} please help me..Thanks Quote Link to post Share on other sites
HelloInsomnia 1103 Posted August 15, 2017 Report Share Posted August 15, 2017 You're not using a thread, you need to use a thread and also a custom command as well so you can use local variables, watch this: 1 Quote Link to post Share on other sites
spa3212 1 Posted August 18, 2017 Author Report Share Posted August 18, 2017 I never get it to work, if will be grateful if anyone can use my code and transform it into working multithreaded..I am able to make open seperate browser, but could not open different account details, in each browser same details is are filled..please help.. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted August 18, 2017 Report Share Posted August 18, 2017 You will have to test this, it should be a good start for you: ui open file("Accounts",#GmailAccount) create table from file(#GmailAccount,&Gmailaccount) ui text box("Starting Point",#StartingPoint) set(#row,#StartingPoint,"Global") add list to list(%Use this proxy,$list from file(#proxy),"Delete","Global") ui open file("Proxy Details Format Proxy:Port",#proxy) ui stat monitor("Working on Row No.",#row) set(#threadCount,3,"Global") set(#usedThreads,0,"Global") loop($table total rows(&Gmailaccount)) { loop while($comparison(#usedThreads,">= Greater than or equal to",#threadCount)) { wait(1) } increment(#usedThreads) Login($table cell(&Gmailaccount,#row,0), $table cell(&Gmailaccount,#row,1)) increment(#row) wait(0.1) } define Login(#username, #password) { thread { in new browser { navigate("https://mail.yahoo.com/","Wait") wait for browser event("Everything Loaded","") type text(<username field>,#username,"Standard") click(<login button>,"Left Click","No") wait for browser event("Everything Loaded","") wait for element(<password field>,"","Appear") type text(<password field>,#password,"Standard") wait for browser event("Everything Loaded","") click($element offset(<login button>,0),"Left Click","No") } decrement(#usedThreads) } } 1 Quote Link to post Share on other sites
spa3212 1 Posted August 19, 2017 Author Report Share Posted August 19, 2017 Thanks for helping me out..I will learn from this code. 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.