Jump to content
UBot Underground

Recommended Posts

Hi! im trying to understand multithreading in ubot. but im having problems getting it to work.
if someone would help me, i would be really happy!

i want 10 threads, and i want those 10 threads to loop as long as i want.

heres what i have done : 

ui text box("threads"#threads)
ui text box("cycles"#cycles)
loop(#cycles) {
    thread {
        in new browser {
            navigate("http://www.ubotstudio.com/playground/simple-form""Wait")
            reset account("Any")
            type text(<username field>$account data("First Name"), "Standard")
            type text(<password field>$account data("Password"), "Standard")
            wait for browser event("Everything Loaded""")
            click(<value="Submit">"Left Click""No")
        }
    }
}

maybe this is simple for you guys, but im such a newbie!

Thanks!

Link to post
Share on other sites

Thanks carl, but i still cant get it to work.

 

Can u take a look at this? 

 

ui text box("Number of accounts"#number accounts)

ui drop down("Thread Count""2,3,4,5,6,7,8,9,10"#num threads)

set(#num created, 0, "Local")

set(#used threads, 0, "Local")

loop(#number accounts) {

    loop while($comparison(#used threads">="#num threads)) {

        wait(1)

    }

    loop process()

define loop process {

        increment(#used threads)

        increment(#num created)

        registration procedure()

define registration procedure {

            thread {

                in new browser {

                    registration code here()

define registration code here {

                        if($comparison(#num created"<="#number accounts)) {

                            then {

                                navigate("http://www.ubotstudio.com/playground/simple-form""Wait")

                                reset account("Any")

                                type text(<username field>$account data("First Name"), "Standard")

                                wait(10)

                                click(<value="Submit">"Left Click""No")

                            }

                            else {

                            }

                        }

                    }

                    decrement(#used threads)

                }

            }

        }

    }

}

 

 

maybe im on the right track atleast?

 

Thanks for getting back to me by the way!

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