gjergj.jorgji 0 Posted March 27, 2017 Report Share Posted March 27, 2017 Hello, I'm trying to create a loop to run some actions only if the url of the browser is equal to 2 string I have entered. My problem is that the loop cannot exit, it runs infinitely. What is the correct way to compare the URL with 2 given strings in UBOT? My script is: loop while($comparison($url,"!= Does not equal",$either("URL1","URL2"))) { //my actions here } Quote Link to post Share on other sites
deliter 203 Posted March 27, 2017 Report Share Posted March 27, 2017 if($comparison($url,"!= Does not equal",$either("URL1","URL2"))) { then { comment("not equal") } else { }} Quote Link to post Share on other sites
gjergj.jorgji 0 Posted March 28, 2017 Author Report Share Posted March 28, 2017 The idea is that the actions I have put in the loop, redirect you to either URL1 or URL2, so I want to make sure one of those URLs is met, and I see that the bot redirects to one of them when I test it, but it just reenters the loop and starts from the beginning. Quote Link to post Share on other sites
pash 504 Posted March 28, 2017 Report Share Posted March 28, 2017 use if($either($comparison($url,"!= Does not equal","URL1"),$comparison($url,"!= Does not equal","URL2"))) { then { } else { } }or loop while($either($comparison($url,"!= Does not equal","URL1"),$comparison($url,"!= Does not equal","URL2"))) { } 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.