papillon121 6 Posted June 15, 2017 Report Share Posted June 15, 2017 Hello Guys and Girls, short question like above: Why there is no "restart script" Option? Now i have a really Long script cause on several Points there is an "if" function like "if thats going wrong, restart script". To "restart" i have to copy the whole script into the "if" function. Ubot is very slow now, cause i got a really large script. is there any other Option i could use? why it is so difficult just to tell ubot "restart script" or "start script from beginning"? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 15, 2017 Report Share Posted June 15, 2017 You should learn how to use defines, they will really help you restart part or all of your script: http://wiki.ubotstudio.com/wiki/Definehttp://network.ubotstudio.com/forum/index.php/topic/19192-tut-define-the-how-to-use-them-and-why-you-should-always-use-them/ Quote Link to post Share on other sites
papillon121 6 Posted June 15, 2017 Author Report Share Posted June 15, 2017 yes ok thank you for the tip, i will do, but this is no answer to my question :-) why isnt there just a "restart script" command? is hard to create such Thing? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 15, 2017 Report Share Posted June 15, 2017 yes ok thank you for the tip, i will do, but this is no answer to my question :-) why isnt there just a "restart script" command? is hard to create such Thing? It does answer your question This is the answer. You put the script into a define and you run the define when you need it to restart. Edit: i'll give an example in a couple of minutes. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 15, 2017 Report Share Posted June 15, 2017 Here is an example where we restart 2 scripts over and over until in this case the number 91 or higher is reached: navigate("https://www.random.org/","Wait") wait(2) set(#numberLimitReached,"false","Global") loop while($comparison(#numberLimitReached,"=","false")) { GenerateRandomNumber() CheckRandomNumber() } define GenerateRandomNumber { click(<name="true-random-integer-generator-button">,"Left Click","No") wait for element(<id="true-random-integer-generator-result">,"","Appear") wait(2) } define CheckRandomNumber { set(#number,$scrape attribute(<id="true-random-integer-generator-result">,"innertext"),"Global") if($comparison(#number,">",90)) { then { alert("Number greater than 90! Stopping..") set(#numberLimitReached,"true","Global") } else { } } } 1 Quote Link to post Share on other sites
papillon121 6 Posted June 15, 2017 Author Report Share Posted June 15, 2017 oh ok, i understand, thank you very much. p.s. nerverless, a short "restart" command would be cooler ;-) 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted June 15, 2017 Report Share Posted June 15, 2017 oh ok, i understand, thank you very much. p.s. nerverless, a short "restart" command would be cooler ;-) If you think people would benefit from it you can always make suggestions here: http://tracker.ubotstudio.com/projects/ubot-studio-stealth-5-9/issues?set_filter=1&tracker_id=2 Quote Link to post Share on other sites
deliter 203 Posted June 16, 2017 Report Share Posted June 16, 2017 yes ok thank you for the tip, i will do, but this is no answer to my question :-) why isnt there just a "restart script" command? is hard to create such Thing? I'd suggest to read the forum, this question pops up from a newbie about every month, the reason it has been requested so much, and has never been implemented is because far better solutions already exist Quote Link to post Share on other sites
papillon121 6 Posted June 16, 2017 Author Report Share Posted June 16, 2017 ok. as a newbie, i dont understand whats better then "restart script" command. its ever better to Keep Things simple. i would say, let the customer decide if he wants to use this command or not. for my script an simple "restart script" command is more usefull than the define command because i have a large script with many "if" commands in different positions of it. So i have to write a define command for several steps, i think its more complicated to write several define command than just to put in one "restart script" command. Quote Link to post Share on other sites
deliter 203 Posted June 19, 2017 Report Share Posted June 19, 2017 sorry for the tone of that, I can see what you mean Quote Link to post Share on other sites
papillon121 6 Posted June 22, 2017 Author Report Share Posted June 22, 2017 no Problem, i would pay for a restart command plugin. does anyone sell this? i thought ist simple to create but it must be very hard to tell ubot just to "restart" 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.