Else If

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 24: Line 24:
 
</pre>
 
</pre>
  
If the first exists qualifier in the if command returns false, the else if command runs. The Else if command check to see if the phrase "UBot Studio Video Tutorials" is available on the page. If it is, then the else if command navigates to the main resources web page and clicks the url for the Video tutorials webpage.
+
 
 +
If the first exists qualifier in the if command returns false, the else if command runs.  
 +
 
 +
The Else if command check to see if the phrase "UBot Studio Video Tutorials" is available on the page.  
 +
 
 +
If it is, then the else if command navigates to the main resources web page and clicks the url for the Video tutorials webpage.
 +
 
  
 
[[File:else if.png]]
 
[[File:else if.png]]

Revision as of 20:21, 20 May 2013

This command is a Flow Command. This command is to be used inside an If statement to check for another condition if the first condition was not returned true.

This is an enhancement that helps avoid nesting If statements inside one other.

You can simply replace the Else node in an If statement with the Else If command.

Condition: The conditional statement which will determine whether the containing commands will run.

Example

if($exists(<innertext="Video Training in Ten Minutes or Less!">)) {
    then {
        click(<innertext=" Video Training in Ten Minutes or Less!
">, "Left Click", "No")
    }
    else if($exists(<innertext="UBot Studio Video Tutorials">)) {
        navigate("http://www.ubotstudio.com/resources", "Wait")
        click(<innertext=" Video Training in Ten Minutes or Less!
">, "Left Click", "No")
    }
}


If the first exists qualifier in the if command returns false, the else if command runs.

The Else if command check to see if the phrase "UBot Studio Video Tutorials" is available on the page.

If it is, then the else if command navigates to the main resources web page and clicks the url for the Video tutorials webpage.


File:Else if.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox