Beele 3 Posted October 5, 2013 Report Share Posted October 5, 2013 Hey :-) I´m looking for a way to combine two if-conditions like if("{$exists(<innertext="aaaaa">)}and{$exists(<innertext="bbbbb">)}") { then { click(<href="ccccc">, "Left Click", "No") } else { click(<title="ddddd">, "Left Click", "No") } } At the moment I use an if within a loop while. loop while($exists(<src="./images/bc_weiter.gif">)) { if($exists(<src="./images/online.gif">)) { then { add list to list(%profile26urls, $scrape attribute(<href=w"/profil.php5?id=*">, "href"), "Delete", "Global") click(<innerhtml="<img src=\"./images/bc_weiter.gif\" alt=\"Weiter\" class=\"suchergebnis_next\">">, "Left Click", "No") wait for element(<class="left suchergebnis_numbers">, "", "Appear") } else { } } } loop($list total(%profile26urls)) { navigate("https://www.url.de/{$list item(%profile26urls, #list26position)}", "Wait") wait for element(<src="./images/bc_senden.gif">, 10, "Appear") click(<src="./images/bc_senden.gif">, "Left Click", "No") and so on.... the 2. loop is a very big loop I know, the 2. loop needs to be too in the else, but then I have it 2 times.... There is an other way ? Quote Link to post Share on other sites
HelloInsomnia 1103 Posted October 5, 2013 Report Share Posted October 5, 2013 You are so close in the first bit, just a bit of adjusting and this will work (it needed spaces basically) if($exists(<innertext="aaaaa">) AND $exists(<innertext="bbbbb">)) { then { click(<href="ccccc">, "Left Click", "No") } else { click(<title="ddddd">, "Left Click", "No") } } Quote Link to post Share on other sites
iDollarsteam 13 Posted October 5, 2013 Report Share Posted October 5, 2013 you have the "$both" parameter in your ubot use that in the if command 1 Quote Link to post Share on other sites
Beele 3 Posted October 5, 2013 Author Report Share Posted October 5, 2013 That´s sooo easy ! I´m looking hours for any way - and at the end its a trifle. Thanks iDollarstream, thanks Hellolnsomnia Quote Link to post Share on other sites
dankass 52 Posted October 10, 2013 Report Share Posted October 10, 2013 and for future reference in addition to the $both param there is the opposite of that of $either ... does not pertain to your case here, just letting you know its there cuz it took me awhile to find $both and $either when I first got started as well. 1 Quote Link to post Share on other sites
Beele 3 Posted October 10, 2013 Author Report Share Posted October 10, 2013 and for future reference in addition to the $both param there is the opposite of that of $either ... does not pertain to your case here, just letting you know its there cuz it took me awhile to find $both and $either when I first got started as well. @dankass: thanks for this tip - so we learn every day a little bit more. The $either I never used before. 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.