Jump to content
UBot Underground

Problem With Stop Button


Recommended Posts

Hi Guys I'm trying to define the command to stop the entire script but it doesn't work

 

ui html panel("<button onclick=\"ubot.runScript(\'run()\')\">Run</button>
<button onclick=\"ubot.runScript(\'stop()\')\">Stop</button>", 100)
define Check Stop {
    if($comparison(#stop, "=", 1)) {
        then {
            stop script
        }
        else {
        }
    }
}
define stop {
    set(#stop, 1, "Global")
    Check Stop()
}

where wrong?

Link to post
Share on other sites

don't work.... i have try with this code:

ui button("Start") {
    run()
}
ui button("Stop") {
    stop()
}
ui button("Clear Cookies") {
    clear cookies
}
define stop {
    set(#run, 0, "Global")
    set(#stop, 1, "Global")
    Check Stop()
}
define Check Stop {
    if($comparison(#stop, "=", 1)) {
        then {
            stop script
        }
        else {
        }
    }
}

but don't work

run command work fine but when click stop thw script continue

Link to post
Share on other sites
define stop {

    set(#stop, 1, "Global")

}

 

 

will work

 

I think I understand what your problem is though.  You need to place the check stop command you created throughout your script.  if stop is set to 1 then check stop will stop the script.

 

 

Know what I mean?
  • Like 1
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...