With Each
From UBot Studio
(Difference between revisions)
(Created page with " This command is an Advanced List. This command will set each list item from a specified list to a variable and run the commands within it using each list it...") |
Revision as of 14:13, 6 June 2015
This command is an Advanced List. This command will set each list item from a specified list to a variable and run the commands within it using each list item.
List: The list items being used Variable: The variable each list item will be set to.
Example
clear list(%my list) add list to list(%my list,$list from text("blue,white,green,yellow,purple",","),"Delete","Global") with each(%my list,#colours) { navigate("http://www.ubotstudio.com/playground/simple-form","Wait") wait(3) type text(<about me textarea>,#colours,"Standard") }
Running the command will navigate to the specified url, wait 3 seconds and fill the specified field with the first list item.
The script within the With each command will repeat for each list item on the list, and stop once it reaches the end of the list.
In this example, the script stops after the last list item has been inserted into the text field.