ugakebet 4 Posted March 26, 2010 Report Share Posted March 26, 2010 Hello guys,I have come across a small problem, can i insert logical operators like OR AND IF NOT etc?? The or, and are really important. Let me know. I want to use it in a if statement like IF .... OR .... Quote Link to post Share on other sites
alcr 135 Posted March 26, 2010 Report Share Posted March 26, 2010 You can do If and If not, if both, if either. And then you can mix them up with setting variables etc. If blabla then set variable true if variable = true then do xy Quote Link to post Share on other sites
ugakebet 4 Posted February 4, 2012 Author Report Share Posted February 4, 2012 But what if i need to use multiple OR operators? such as if sky is blue {then {grass is green OR sun is yellow OR plane is white OR i am fat OR you are fat}} how do i use multiple OR operators, other that keep inserting $either(which only limits for just 2 elements) Quote Link to post Share on other sites
Eddie Waller 158 Posted February 4, 2012 Report Share Posted February 4, 2012 But what if i need to use multiple OR operators? such as if sky is blue {then {grass is green OR sun is yellow OR plane is white OR i am fat OR you are fat}} how do i use multiple OR operators, other that keep inserting $either(which only limits for just 2 elements) There are two ways to do it. Right now $either only supports 2 conditions which will eventually get fixed. But a workaround for that is to put an $either inside the 2nd condition, then it will support 3 conditions, and you can continue that to support as many conditions as you want. The other way is to just write out the conditions as shown in this video: http://screencast.com/t/L7UR89vJQaSV Keep in mind for checking equality to words you would need to do #x = "cat" OR #y = "dog" with the quotation marks if you want to do it this way. Quote Link to post Share on other sites
Chezzyk 0 Posted November 20, 2016 Report Share Posted November 20, 2016 "Right now $either only supports 2 conditions which will eventually get fixed." its end of 2016 and it looks there are still only 2 conditions in $either. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 20, 2016 Report Share Posted November 20, 2016 "Right now $either only supports 2 conditions which will eventually get fixed." its end of 2016 and it looks there are still only 2 conditions in $either. What are you trying to do there is probably some way to do it. Quote Link to post Share on other sites
deliter 203 Posted November 21, 2016 Report Share Posted November 21, 2016 I wouldnt suggest this but I guess it works,as described,to check for multiple conditions nested inside of it,but sucks really,this example tests 4 conditions if any true returns true,can nest more can also modify it to input more Conditions "Right now $either only supports 2 conditions which will eventually get fixed." its end of 2016 and it looks there are still only 2 conditions in $either. define $EitherOr(#ConditionOne, #ConditionTwo) { if($comparison(#ConditionOne,"=",$true) OR $comparison(#ConditionTwo,"=",$true)) { then { return($true) } else { return($false) } } } navigate("http://www.ubotstudio.com/resources","Wait") wait for browser event("Everything Loaded","") alert($EitherOr($EitherOr($exists(<title="Home">), $exists(<id="upgrade_notif_content">)), $EitherOr($exists($element offset(<tagname="h1">,1)), $exists(<title="Contact">)))) 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.