Set

From UBot Studio
Revision as of 17:36, 22 March 2013 by LillyT (Talk | contribs)

Jump to: navigation, search

Set is a Data Command.

This command allows you to store a value in a variable.

The command settings allow you to determine if you want the variable to be:

Local: Specific to the command the variable is set to. It will not affect or be affected by another variable with the same name in a different command.

Global: The variable can be used everywhere and will affect and be affected by another variable with the same name in a different command.

Example


navigate("http://www.google.com/", "Wait")
set(#color, "yellow", "Local")
type text(<name="q">, #color, "Standard")


The above script will create a variable with the value "yellow" and fill the google search field with the value yellow.

File:Yellowset.png


navigate("http://www.google.com/", "Wait")
define tes2 {
    set(#one, "blue", "Local")
    type text(<name="q">, #one, "Standard")
}
define tes1 {
    set(#one, "red", "Local")
    type text(<name="q">, #one, "Standard")
}
tes1()
tes2()

Notice that each variable is set locally, and though they both have the same names, they do not affect each other.

One value is Red and the other is Blue.

File:Set.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox