If
From UBot Studio
(Difference between revisions)
(→Example) |
(→Example) |
||
(3 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | This command is found under the [[Flow Commands]].This command runs the contained commands if the conditional set within it is true. The if command comes with the [[Then]] and [[Else]] commands contained within it. | + | This command is found under the [[Flow Commands]].This command runs the contained commands if the conditional set within it is true. |
+ | |||
+ | The if command comes with the [[Then]] and [[Else]] commands contained within it. | ||
+ | |||
+ | '''Condition To Run Commands:''' The condition that will determine which containing node (within the Then or Else commands) will run. | ||
+ | |||
== Example == | == Example == | ||
− | The if part of the script determines what condition is being met. In this case, the exists qualifier is used to search for a certain | + | The if part of the script determines what condition is being met. In this case, the exists qualifier is used to search for a certain url. |
+ | |||
+ | The rest of the script relies on the existence or nonexistence of that url. | ||
+ | |||
<pre> | <pre> | ||
Line 19: | Line 27: | ||
</pre> | </pre> | ||
− | [[File:if. | + | |
+ | [[File:if.jpg]] |
Latest revision as of 19:48, 16 September 2013
This command is found under the Flow Commands.This command runs the contained commands if the conditional set within it is true.
The if command comes with the Then and Else commands contained within it.
Condition To Run Commands: The condition that will determine which containing node (within the Then or Else commands) will run.
[edit] Example
The if part of the script determines what condition is being met. In this case, the exists qualifier is used to search for a certain url.
The rest of the script relies on the existence or nonexistence of that url.
if($exists(<innertext="Video Training in Ten Minutes or Less!">)) { then { click(<innertext=" Video Training in Ten Minutes or Less! ">, "Left Click", "No") } else { navigate("http://www.ubotstudio.com/resources", "Wait") click(<innertext=" Video Training in Ten Minutes or Less! ">, "Left Click", "No") } }