musician87 2 Posted May 5, 2017 Report Share Posted May 5, 2017 Hello, I've set an "if" function and I would like to restart the project is the criteria that I've set is not matched. If XThen YElse Restart Any hint? Quote Link to post Share on other sites
deliter 203 Posted May 5, 2017 Report Share Posted May 5, 2017 put everthing before the if into a define command, or you could actually put the whole thing in would be better if something = another thing then do X else do your command again see the simple code below keeps repeating itselfHeres a thread a guy basically asked the same question, I thought he was a different person hrnce the long rambling, but the rambling might actually help you so maybe take a read of it, but check the code out http://network.ubotstudio.com/forum/index.php/topic/20715-google-scraping-how-to-tell-ubot-to-loop-as-many-times-as-there-are-google-results-pages/?p=128493 define alerter { alert("hello") if($comparison(1,"=",1)) { then { wait(2) alerter() } else { } } } alerter() 1 Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted May 5, 2017 Report Share Posted May 5, 2017 Or you can just put it all in the then command and remove else or leave it empty. 1 Quote Link to post Share on other sites
musician87 2 Posted May 8, 2017 Author Report Share Posted May 8, 2017 put everthing before the if into a define command, or you could actually put the whole thing in would be better if something = another thing then do X else do your command again see the simple code below keeps repeating itselfHeres a thread a guy basically asked the same question, I thought he was a different person hrnce the long rambling, but the rambling might actually help you so maybe take a read of it, but check the code out http://network.ubotstudio.com/forum/index.php/topic/20715-google-scraping-how-to-tell-ubot-to-loop-as-many-times-as-there-are-google-results-pages/?p=128493 define alerter { alert("hello") if($comparison(1,"=",1)) { then { wait(2) alerter() } else { } } } alerter() Worked by using the define option, thank you so much! 1 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.