Jump to content
UBot Underground

How Use ui button inside Threads?


Recommended Posts

how can i set ui button for each thread?

 

im using different proxy on each thread ,sometimes there is a problem with a specific proxy and i get a blank page on this thread while the other threads keep running.

 

so i want to push a button and do all the login process again on this thread without stop the bot which will close all the threads.

 

here is the basic code:

ui button("login account 1") {
    if(#thread number = 1) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 2") {
    if(#thread number = 2) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 3") {
    if(#thread number = 3) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 4") {
    if(#thread number = 4) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 5") {
    if(#thread number = 5) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 6") {
    if(#thread number = 6) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 7") {
    if(#thread number = 7) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 8") {
    if(#thread number = 8) {
        then {
            login to account()
        }
        else {
        }
    }
}
set(#account number, 0, "Global")
loop(8) {
    wait(2)
    thread {
        in new browser {
            write to browser()
            wait(10000)
        }
    }
}
define write to browser {
    increment(#account number)
    set(#thread number, #account number, "Local")
    load html(#account number)
}
define login to account {
    navigate("http://www.yahoo.com/", "Wait")
}

Link to post
Share on other sites

You would make login to account a custom command and send the username, password and proxy as the variables and make all the variables inside of it set to be local.

 

Try this, I only changed the first ui button you will have to add login to account to the rest and all the details.

ui button("login account 1") {
    if(#thread number = 1) {
        then {
            login to account("email", "pass", "proxy")
        }
        else {
        }
    }
}
ui button("login account 2") {
    if(#thread number = 2) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 3") {
    if(#thread number = 3) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 4") {
    if(#thread number = 4) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 5") {
    if(#thread number = 5) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 6") {
    if(#thread number = 6) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 7") {
    if(#thread number = 7) {
        then {
            login to account()
        }
        else {
        }
    }
}
ui button("login account 8") {
    if(#thread number = 8) {
        then {
            login to account()
        }
        else {
        }
    }
}
set(#account number, 0, "Global")
loop(8) {
    wait(2)
    thread {
        in new browser {
            write to browser()
            wait(10000)
        }
    }
}
define write to browser {
    increment(#account number)
    set(#thread number, #account number, "Local")
    load html(#account number)
}
define login to account(#email, #password, #proxy) {
    thread {
        in new browser {
            change proxy(#proxy)
            navigate("https://login.yahoo.com/config/login", "Wait")
            type text(<username field>, #email, "Standard")
            type text(<name="passwd">, #password, "Standard")
        }
    }
}

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...