Jump to content
UBot Underground

Stop Script After Start Button


Recommended Posts

Hi Guys,

 I can't seem to understand how to stop the bot automation after using the stop or pause command.

Basicly visit a website through shared browser.

I set the wait to 90sec.

Is there a way to stop or pause it in between after I click on a stop or pause button?

This is what I got so far.

 

ui button("Start") {
    thread {
        in shared browser {
            navigate("http://google.com""Wait")
        }
    }
}
ui button("Close Browser") {
}

 

Can this be done without the default buttons at top?

I just need to know how the pause and stop used after a shared browser opens.

 

Link to post
Share on other sites

Ok First problem is you are using UI Buttons instead of Defines but you will soon realize that yourself,on your issue You can press Button to Stop the Browser but since it takes 90 seconds to perform 1 loop Your browser will be closed after Ubot finishes Counting 90 seconds this below will work but with delay!

 

I didn't had a chance to look at it more closely i am in a hurry right now but the code below should work,again with a delay!

Watch Debugger to find our why and how Script stops!

 

ui button("Start") {
    thread {
        in shared browser {
            loop(10) {
                navigate("http://google.com","Wait")
                if($comparison(#stop,"=",$true)) {
                    then {
                        stop script
                    }
                    else {
                    }
                }
                if($comparison(#stop,"=",$true)) {
                    then {
                        close page
                    }
                    else {
                    }
                }
                wait(10)
            }
        }
    }
}
ui button("Close Browser") {
    set(#stop,$true,"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...