Goodieweb 28 Posted November 1, 2012 Report Share Posted November 1, 2012 While making a script, when I click start in Ubot Studio, it just keeps running, even when I press the Stop button, it just keeps running. I have to close Ubot Studio and reopen the script, but then when I open the script and press Start again, it will just keep running, and I have a loop in it, that visits like 50 URLs, when I press Stop it doesn't stop. It just continues....? Quote Link to post Share on other sites
gabel 51 Posted November 1, 2012 Report Share Posted November 1, 2012 are you sure you`ve pressed run and not run node ? Quote Link to post Share on other sites
jason 101 Posted November 1, 2012 Report Share Posted November 1, 2012 If you're using a loop, it sometimes keeps going until the command is finished. This can be a while. Quote Link to post Share on other sites
Bliss 194 Posted November 1, 2012 Report Share Posted November 1, 2012 While making a script, when I click start in Ubot Studio, it just keeps running, even when I press the Stop button, it just keeps running. I have to close Ubot Studio and reopen the script, but then when I open the script and press Start again, it will just keep running, and I have a loop in it, that visits like 50 URLs, when I press Stop it doesn't stop. It just continues....? There is a way around this. You make a stop button in the UI, in that stop button you set a variable (in my example i called it #shallistop) and then throughout your loop you use the if statement to check if the variable is set to YES, then when you press the stop button the loop will stop! no need to wait for it to finish. Here is a little example for you. ui stat monitor("Loop", #loopnumber) set(#shallistop, $nothing, "Global") set(#shalistop, $nothing, "Global") set(#loopnumber, 0, "Global") ui button("STOP") { set(#shalistop, "YES", "Global") } loop(999999) { if(#shalistop = "YES") { then { stop script } } wait(0.2) increment(#loopnumber) } So lets say my loop was huge (like yours is), I would put the following code everywhere i wanted it to stop if the button is pressed if(#shalistop = "YES") { then { stop script } } The above code is just an example, you can use what ever variable names you like... It's just to try to show you how i do it. Hope this helps Jane 3 Quote Link to post Share on other sites
Goodieweb 28 Posted May 16, 2013 Author Report Share Posted May 16, 2013 There is a way around this. You make a stop button in the UI, in that stop button you set a variable (in my example i called it #shallistop) and then throughout your loop you use the if statement to check if the variable is set to YES, then when you press the stop button the loop will stop! no need to wait for it to finish. Here is a little example for you. ui stat monitor("Loop", #loopnumber) set(#shallistop, $nothing, "Global") set(#shalistop, $nothing, "Global") set(#loopnumber, 0, "Global") ui button("STOP") { set(#shalistop, "YES", "Global") } loop(999999) { if(#shalistop = "YES") { then { stop script } } wait(0.2) increment(#loopnumber) } So lets say my loop was huge (like yours is), I would put the following code everywhere i wanted it to stop if the button is pressed if(#shalistop = "YES") { then { stop script } } The above code is just an example, you can use what ever variable names you like... It's just to try to show you how i do it. Hope this helps Jane Thank you very much. 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.