Decrement
From UBot Studio
(Difference between revisions)
(Created page with "Decrement is a Data Command. This command will decrement a variable set to a number by one. == Example == <pre> navigate("http://www.google.com/", "Wait")...") |
(→Example) |
||
| (4 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
Decrement is a [[Data Commands|Data Command]]. | Decrement is a [[Data Commands|Data Command]]. | ||
| − | This command will decrement a variable set to a number by one. | + | This command will decrement (reduce) a variable set to a number by one. |
| + | |||
| + | '''Variable:''' The variable with the value that is going to be decremented. | ||
| + | |||
| + | |||
== Example == | == Example == | ||
| + | |||
| + | |||
<pre> | <pre> | ||
| Line 14: | Line 20: | ||
</pre> | </pre> | ||
| + | |||
| + | |||
The number 5 in the variable #one is decremented until it gets to 0. | The number 5 in the variable #one is decremented until it gets to 0. | ||
| Line 19: | Line 27: | ||
Notice that in order to decrement the number in the variable, the variable is inserted into the decrement command. | Notice that in order to decrement the number in the variable, the variable is inserted into the decrement command. | ||
| − | [[File: | + | |
| + | |||
| + | |||
| + | [[File:dec.jpg]] | ||
Latest revision as of 17:02, 23 September 2013
Decrement is a Data Command.
This command will decrement (reduce) a variable set to a number by one.
Variable: The variable with the value that is going to be decremented.
[edit] Example
navigate("http://www.google.com/", "Wait")
set(#one, 5, "Global")
loop(5) {
decrement(#one)
type text(<name="q">, #one, "Standard")
}
The number 5 in the variable #one is decremented until it gets to 0.
Notice that in order to decrement the number in the variable, the variable is inserted into the decrement command.
