Enigma 78 Posted September 24, 2013 Report Share Posted September 24, 2013 I'm making a script that has to check for multiple things by using the $either qualifier. In the past we could do this easily by the example in the following video: It seems this is not possible anymore... why???? :\ Now there is only "first condition" and "second condition". See here http://wiki.ubotstudio.com/wiki/Either I need to be able to add 20+ $eithers! 1 Quote Link to post Share on other sites
giganut 109 Posted September 24, 2013 Report Share Posted September 24, 2013 I agree! I need that and not just $both I would like to see them unlimeted like a add more button or something. Quote Link to post Share on other sites
the_way 52 Posted September 24, 2013 Report Share Posted September 24, 2013 just use: if either, else if either, else if either, that should sort it Quote Link to post Share on other sites
Enigma 78 Posted September 24, 2013 Author Report Share Posted September 24, 2013 just use: if either, else if either, else if either, that should sort it That's not working like you said....You say: IF $either 1 or 2 THEN do this, ELSE IF $either etc.etc.etc.Makes no sense. A total different result than what i want to achieve: IF $either 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 THEN do this, ELSE do that. 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 24, 2013 Report Share Posted September 24, 2013 Just use OR, you can copy a command in then space OR space command It does look a bit off when you hit enter but it works perfectly set(#number, 5, "Global") if($comparison(#number, "=", 4) OR $comparison(#number, "=", 5) OR $comparison(#number, "=", 6)) { then { alert("Yes") } else { alert("No") } } 2 Quote Link to post Share on other sites
Enigma 78 Posted September 24, 2013 Author Report Share Posted September 24, 2013 I have kinda bypassed this issue by using over 20(!) IF statements to check if some of the 20+ things are on a page, and used code in a Define and run that same code in all ELSE statements. Please note that this is FARRRRRR from ideal, as it costed me plenty of boring time to repeat the same process over and over again, plus the ubot script in particular only has become much longer and probably take a bit more time to run trough all this mess of code. Unbelievable they removed the multiple $either from uBot v4.Not user-friendly. Quote Link to post Share on other sites
Enigma 78 Posted September 24, 2013 Author Report Share Posted September 24, 2013 Just use OR, you can copy a command in then space OR space command It does look a bit off when you hit enter but it works perfectly set(#number, 5, "Global") if($comparison(#number, "=", 4) OR $comparison(#number, "=", 5) OR $comparison(#number, "=", 6)) { then { alert("Yes") } else { alert("No") } } Thanks that does make sense.I'll play with it next time, as i have "fixed" it my way (see previous post). Still wondering why Ubot did not add the OR themself in the drag & drop.i did not even know the OR is possible in uBot just because it is nowhere in the Commnands or Parameters (on the left). Quote Link to post Share on other sites
blumi40 222 Posted September 25, 2013 Report Share Posted September 25, 2013 u also can use the short wayset(#var, 5, "Global")if(#var = 1 OR #var = 2 OR #var = 3 OR #var = 4 OR #var = 5) { then { alert("value found") } else { }}also this is possibleset(#var, 5, "Global")set(#var2, 7, "Global")if((#var = 1 AND #var2 = 7) OR (#var = 2 AND #var2 = 7))OR (#var = 3 AND #var2 = 7) OR ( #var = 4 AND #var2 = 7) OR (#var = 5 AND #var2 = 7) ) { then { alert("value found") } else { }}for me that is a much more flexible way instead use $both and $either 2 Quote Link to post Share on other sites
the_way 52 Posted September 25, 2013 Report Share Posted September 25, 2013 superb thread, with different perspectives and ideas, wish they were all like this Quote Link to post Share on other sites
giganut 109 Posted September 26, 2013 Report Share Posted September 26, 2013 Just use OR, you can copy a command in then space OR space command It does look a bit off when you hit enter but it works perfectly set(#number, 5, "Global") if($comparison(#number, "=", 4) OR $comparison(#number, "=", 5) OR $comparison(#number, "=", 6)) { then { alert("Yes") } else { alert("No") } } I typed in OR once before in the search bar of ubot but nothing came up, so I thought thatit did not exist, is there any other ones that are not listed in the drag and drop tool box thatyou know of? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 26, 2013 Report Share Posted September 26, 2013 AND I wouldn't be surprised if there was even more but those are the only two that I currently use. 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.