Brutal 164 Posted August 12, 2014 Report Share Posted August 12, 2014 Hi guys, I'm having trouble trying to figure out how to code this. IF - #ThisVar contains "ABC" AND "XYZ"THEN - do this Quote Link to post Share on other sites
UBotDev 276 Posted August 12, 2014 Report Share Posted August 12, 2014 UBot command for logical AND operation is called BOTH, so pseudo code would look like this: IF BOTH(CONATINS(#var,"ABC"),CONATINS(#var"XYZ")) THEN... Quote Link to post Share on other sites
arunner26 51 Posted August 12, 2014 Report Share Posted August 12, 2014 IF - #ThisVar contains "ABC" AND #ThisVar contains "XYZ"THEN - do this Quote Link to post Share on other sites
stanf 43 Posted August 12, 2014 Report Share Posted August 12, 2014 if($both($contains("the runner wins", "wins"), $contains("the runner wins", "the"))) { then { alert("") } else { }} Quote Link to post Share on other sites
Brutal 164 Posted August 12, 2014 Author Report Share Posted August 12, 2014 Thanks guys - I appreciate it! Still having trouble so let's approach from a different perspective. Lets say that I have a variable that contains the sentence: the brown dog has fleas And I want to read that variable, and if it has the word "brown" then I want to replace that word with a different word contained in a different variable. In addition, if that sentence has the word "fleas" in it, then I want to also replace that word with a different word that is also contained in a different variable. So, i have 3 variables... #var1 = the brown dog has fleas#var2 = black#var3 = big feet So, my function would need to change #var1 from it's current sate to the new state of: the black dog has big feet Quote Link to post Share on other sites
Brutal 164 Posted August 12, 2014 Author Report Share Posted August 12, 2014 Pfffft.... I was way over complicating this. I have it covered now, so thanks again for the help. 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.