Jump to content
UBot Underground

Can I create other instances/thread when switching Module window?


Recommended Posts

Hello guys..

I need to know if I can create another instance of ubot browser when accesing another module when adding a new Script window.

For example, when I run a new script on a new window I want to be able to open another script while the first one is running, and then run the 2nd script in the same time.

Link to post
Share on other sites

You should run your scripts wrapped inside of the in new browser command for this.

http://wiki.ubotstudio.com/wiki/In_New_Browser

 

You would also want to use the ui buttons to start and abort your scripts, since the default play and stop buttons are for running one script at a time.

http://wiki.ubotstudio.com/wiki/UI_button

 

Small example using start and abort.

ui button("Start") {
    set(#running, "true", "Global")
    thread {
        loop while($comparison(#running, "=", "true")) {
            wait(1)
        }
        alert("Done!")
        stop script
    }
    in new browser {
        nav_to()
    }
}
ui button("Abort") {
    set(#running, "false", "Global")
}
define nav_to {
    loop(100) {
        navigate("http://google.com", "Wait")
        reset account("Any")
        navigate("http://ubotstudio.com/playground/simple-form", "Wait")
        type text(<about me textarea>, $account data("First Name"), "Standard")
        wait(3)
    }
    set(#running, "false", "Global")
}

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