Eval

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
(Example)
Line 25: Line 25:
  
  
[[File:evaladd.jpg]]
+
[[File:eval.jpg]]
  
  

Revision as of 18:06, 3 October 2013

This function returns the results of executing a piece of javascript or simple mathematical equations. $Eval is a Math Function.

With anything except for math equations, you will need a full website opened in the main browser in order to run the eval function.

Expression: the math or javascript expression being evaluated.


Example

navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")
type text(<about me textarea>, $eval($add(4, 4)), "Standard")


Typing 4+4 into the eval function brings up a new function called the add function.


$eval($add(4, 4))


Eval.jpg


navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")
type text(<about me textarea>, $eval($subtract(4, 4)), "Standard")


The subtract function appears when 4-5 is typed into the eval function.


$eval($subtract(4, 4))


Going back to our original script:

Running the script will fill the field with the correct answer for 4-4.


Eval0.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox