Rand

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
(Example)
Line 15: Line 15:
 
</pre>
 
</pre>
  
Running this script will fill the field with 5 numbers between 100 and 200.  
+
Running this script will fill the field with 5 numbers between 100 and 200, each separated by a comma.  
  
 
[[File:rand.png]]
 
[[File:rand.png]]

Revision as of 22:42, 23 October 2012

This function returns a random number between the minimum and maximum values. $Rand is a Math Function.

You can use the Rand anywhere you need a random value. You can use it anywhere from a qualifier in the if then else command, to the eval constant. It is simply there to provide a random number between two values.


Example

navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")
loop(5) {
    type text(<about me textarea>, "{$rand(100, 200)},", "Standard")
}

Running this script will fill the field with 5 numbers between 100 and 200, each separated by a comma.

File:Rand.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox