Jump to content
UBot Underground

Recommended Posts

Hello

I am using thread spawn command but it uses same accounts in each thread.

Here is my code:-

ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
create table from file(#uiopen csv,&csvtable)
set(#row,0,"Global")
thread spawn($table total rows(&csvtable),5) {
    in new browser {
        allow images("No")
        navigate("#websitelink","Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        type text(<email field>,$table cell(&csvtable,#row,0),"Standard")
        type text(<password field>,$table cell(&csvtable,#row,1),"Standard")
        click(<login button>,"Left Click","No")
        increment(#row)
        clear cookies
    }
}

Can someone please tell me what wrong I am doing? I followed example 2 (Thread Spawn With Tables) which is given here: http://wiki.ubotstudio.com/wiki/Thread_Spawn

Link to post
Share on other sites

Hi,

 

Tables are not thread safe. Try this....

ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
clear list(%data)
add list to list(%data,$list from file(#uiopen csv),"Delete","Global")
thread spawn($list total(%data),5) {
    in new browser {
        comment("set to local for threading wont work right otherwise
won\'t show in debugger")
        set(#data NLI,$next list item(%data),"Local")
        allow images("No")
        clear cookies
        navigate("#websitelink","Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        comment("position 0 for email")
        type text(<email field>,$list item($list from text(#data NLI,","),0),"Standard")
        comment("postion 1 for password and assuming , is the delimiter")
        type text(<password field>,$list item($list from text(#data NLI,","),1),"Standard")
        click(<login button>,"Left Click","No")
    }
}

Should work, I didn't test it.

 

Regards,

Nick

Link to post
Share on other sites

Hi,

 

Tables are not thread safe. Try this....

ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
clear list(%data)
add list to list(%data,$list from file(#uiopen csv),"Delete","Global")
thread spawn($list total(%data),5) {
    in new browser {
        comment("set to local for threading wont work right otherwise
won\'t show in debugger")
        set(#data NLI,$next list item(%data),"Local")
        allow images("No")
        clear cookies
        navigate("#websitelink","Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        comment("position 0 for email")
        type text(<email field>,$list item($list from text(#data NLI,","),0),"Standard")
        comment("postion 1 for password and assuming , is the delimiter")
        type text(<password field>,$list item($list from text(#data NLI,","),1),"Standard")
        click(<login button>,"Left Click","No")
    }
}

Should work, I didn't test it.

 

Regards,

Nick

 

Hi Nick

Thanks for your reply. I tried your code but unfortunately it still uses the same accounts in all threads. My data is like this:-

 

username,pass

username1,pass

 

I checked with 2 threads and it entered same account in both threads. I was very hopeful that your code will work because it looks perfect using to me but it didn't. Can you please check if there is anything missing?

 

Maybe I need to add little wait time at the end so that it have time to consider data for "next list item" command?

Link to post
Share on other sites

Hi Nick

Thanks for your reply. I tried your code but unfortunately it still uses the same accounts in all threads. My data is like this:-

 

username,pass

username1,pass

 

I checked with 2 threads and it entered same account in both threads. I was very hopeful that your code will work because it looks perfect using to me but it didn't. Can you please check if there is anything missing?

 

Maybe I need to add little wait time at the end so that it have time to consider data for "next list item" command?

I tried to add 1 second wait time but still it runs same accounts in all threads

Link to post
Share on other sites

try add wait time before or after next thread.

ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
create table from file(#uiopen csv,&csvtable)
set(#row,0,"Global")
thread spawn($table total rows(&csvtable),5) {
    in new browser {
        set(#email,$table cell(&csvtable,#row,0),"Local")
        set(#password,$table cell(&csvtable,#row,1),"Local")
        allow images("No")
        navigate("#websitelink","Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        type text(<email field>,#email,"Standard")
        type text(<password field>,#password,"Standard")
        click(<login button>,"Left Click","No")
        increment(#row)
        clear cookies
    }
    wait(0.1)
}
Link to post
Share on other sites

 

try add wait time before or after next thread.

ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
create table from file(#uiopen csv,&csvtable)
set(#row,0,"Global")
thread spawn($table total rows(&csvtable),5) {
    in new browser {
        set(#email,$table cell(&csvtable,#row,0),"Local")
        set(#password,$table cell(&csvtable,#row,1),"Local")
        allow images("No")
        navigate("#websitelink","Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        type text(<email field>,#email,"Standard")
        type text(<password field>,#password,"Standard")
        click(<login button>,"Left Click","No")
        increment(#row)
        clear cookies
    }
    wait(0.1)
}

 

Hi

I tried it but still it uses same account in all threads. Not sure what's the issue.

Link to post
Share on other sites

@uBotForMe

Try this code :

ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
create table from file(#uiopen csv,&csvtable)
set(#row,0,"Global")
clear list(%row)
loop($table total rows(&csvtable)) {
    add item to list(%row,#row,"Don\'t Delete","Global")
    increment(#row)
}
thread spawn($table total rows(&csvtable),5) {
    Go($next list item(%row))
    wait(1)
}
define Go(#rowtable) {
    in new browser {
        allow images("No")
        navigate(#websitelink,"Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        type text(<email field>,$table cell(&csvtable,#rowtable,0),"Standard")
        type text(<password field>,$table cell(&csvtable,#rowtable,1),"Standard")
        click(<login button>,"Left Click","No")
    }
}

report the results here. 

Link to post
Share on other sites

Your welcome..
Let me say 1 thing.  TO HELL WITH TABLES AND THREADING..  Use them Local lists. 
Don't make it more difficult then it needs to be.



ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
clear list(%csvtable)
add list to list(%csvtable,$list from file(#uiopen csv),"Delete","Global")
thread spawn($list total(%csvtable),5) {
    Go($next list item(%csvtable))
    wait(1)
}
define Go(#rowtable) {
    add list to list(%breakdown table,$list from text(#rowtable,","),"Don\'t Delete","Local")
    in new browser {
        allow images("No")
        navigate(#websitelink,"Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        type text(<email field>,$list item(%breakdown table,0),"Standard")
        type text(<password field>,$list item(%breakdown table,2),"Standard")
        click(<login button>,"Left Click","No")
    }
}

  • Like 2
Link to post
Share on other sites

I am trying it


@uBotForMe

Try this code :

ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
create table from file(#uiopen csv,&csvtable)
set(#row,0,"Global")
clear list(%row)
loop($table total rows(&csvtable)) {
    add item to list(%row,#row,"Don\'t Delete","Global")
    increment(#row)
}
thread spawn($table total rows(&csvtable),5) {
    Go($next list item(%row))
    wait(1)
}
define Go(#rowtable) {
    in new browser {
        allow images("No")
        navigate(#websitelink,"Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        type text(<email field>,$table cell(&csvtable,#rowtable,0),"Standard")
        type text(<password field>,$table cell(&csvtable,#rowtable,1),"Standard")
        click(<login button>,"Left Click","No")
    }
}

report the results here. 

 

 

Your welcome..
Let me say 1 thing.  TO HELL WITH TABLES AND THREADING..  Use them Local lists. 
Don't make it more difficult then it needs to be.



ui open file("browse",#uiopen csv)
ui stat monitor("Loop counter",#row)
ui text box("Link",#websitelink)
clear list(%csvtable)
add list to list(%csvtable,$list from file(#uiopen csv),"Delete","Global")
thread spawn($list total(%csvtable),5) {
    Go($next list item(%csvtable))
    wait(1)
}
define Go(#rowtable) {
    add list to list(%breakdown table,$list from text(#rowtable,","),"Don\'t Delete","Local")
    in new browser {
        allow images("No")
        navigate(#websitelink,"Wait")
        wait for browser event("Everything Loaded",10)
        wait for element(<email field>,10,"Appear")
        type text(<email field>,$list item(%breakdown table,0),"Standard")
        type text(<password field>,$list item(%breakdown table,2),"Standard")
        click(<login button>,"Left Click","No")
    }
}

 

I just tried code of @LoWrIdErTJ - BotGuru and I am glad to inform you that it has worked perfectly. I run 75 accounts and all 75 accounts created.

 

I am so happy that finally I got solution  :)

 

Thank you so much LoWrIdErTJ - BotGuru and Varo

Edited by uBotForMe
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...