$table total rows
From UBot Studio
(Difference between revisions)
(Created page with "$table total rows is a Variable Function. This function will grab the total rows within a table. This is especially useful within a loop, when you are ...") |
|||
Line 1: | Line 1: | ||
− | $table total rows is a [[ | + | $table total rows is a [[Data Functions|Data Function]]. This function will grab the total rows within a table. This is especially useful within a |
loop, when you are trying to fill a lot of fields with the contents of a certain column of information. | loop, when you are trying to fill a lot of fields with the contents of a certain column of information. | ||
Revision as of 15:07, 11 April 2013
$table total rows is a Data Function. This function will grab the total rows within a table. This is especially useful within a loop, when you are trying to fill a lot of fields with the contents of a certain column of information.
Example
navigate("http://www.ubotstudio.com/playground/simple-form", "Wait") create table from file("C:\\Users\\LillyT\\Documents\\my table.txt", &my table) set(#row, 0, "Global") loop($table total rows(&my table)) { type text(<about me textarea>, $table cell(&my table, #row, 0), "Standard") type text(<about me textarea>, $table cell(&my table, #row, 1), "Standard") wait(4) increment(#row) }
Running the script will set the loop to loop according to how many rows are in the table. The increment command then increments the row position each time the command is run.
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.