$table total columns

From UBot Studio
Jump to: navigation, search

$table total columns is a Data Function. This function will grab the total columns within a table.

This is especially useful within a loop. The loop command is usually set to the function to make sure the loop loops according to how many columns are in the table.

Table: The desire populated table where the table total column will be pulled from.

Example

navigate("http://www.ubotstudio.com/playground/simple-form", "Wait")
create table from file("C:\\Users\\Documents\\my table.txt", &my table)
set(#columns, 0, "Global")
loop($table total columns(&my table)) {
    type text(<about me textarea>, $table cell(&my table,0, #columns), "Standard")
    type text(<about me textarea>, $table cell(&my table, 1, #columns), "Standard")
    wait(4)
    increment(#columns)
}


Running the script will set the loop to loop according to how many column are in the table. The increment command then increments the row position each time the command is run.


list item 1,list item 2
list item3,list item 4


The list items are arrange in the following order:


row 0 column 0, row 0 column 1
row 1 column 0, row 1 column 1


The script will then fill the field with items in row 0 column 0, row 0 column 1, row 1, column 0 and row 1, column 1.


Vphs44.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox