emilix85 0 Posted April 17, 2013 Report Share Posted April 17, 2013 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? Quote Link to post Share on other sites
AutomationNinja 194 Posted April 17, 2013 Report Share Posted April 17, 2013 Try this: define stop { set(#stop, 1, "Global")} Quote Link to post Share on other sites
emilix85 0 Posted April 17, 2013 Author Report Share Posted April 17, 2013 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 workrun command work fine but when click stop thw script continue Quote Link to post Share on other sites
nuc63 27 Posted April 17, 2013 Report Share Posted April 17, 2013 is this a multi threading bot with multiple threads? Quote Link to post Share on other sites
AutomationNinja 194 Posted April 17, 2013 Report Share Posted April 17, 2013 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? 1 Quote Link to post Share on other sites
emilix85 0 Posted April 18, 2013 Author Report Share Posted April 18, 2013 yes thanks problem solved Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.