Delete from Table
From UBot Studio
(Difference between revisions)
(Created page with "Delete from Table is a Data Command. This command deletes a specified row or column and moves the remaining populated rows or columns over. == Example == ...") |
(→Example) |
||
Line 18: | Line 18: | ||
[[File:del.png]] | [[File:del.png]] | ||
+ | |||
+ | |||
This is why the two delete form table commands have been added. Running the entire script will populate the table with the lists' contents, and then remove columns 0 and 1. | This is why the two delete form table commands have been added. Running the entire script will populate the table with the lists' contents, and then remove columns 0 and 1. | ||
We have added two delete from table commands because deleting the column 0 moves the rest of the script up. Column 1 row 0 becomes column 0 row 0, and the second delete from table command delete the contents of column 0 again, moving the contents of that column up to replace the empty space. | We have added two delete from table commands because deleting the column 0 moves the rest of the script up. Column 1 row 0 becomes column 0 row 0, and the second delete from table command delete the contents of column 0 again, moving the contents of that column up to replace the empty space. | ||
+ | |||
+ | |||
[[File:del1.png]] | [[File:del1.png]] |
Revision as of 21:20, 22 March 2013
Delete from Table is a Data Command.
This command deletes a specified row or column and moves the remaining populated rows or columns over.
Example
navigate("http://www.fruitsinfo.com/tropical-fruits.php", "Wait") add list to list(%one, $scrape attribute(<href=w"http://www.fruitsinfo.com/*.php">, "innertext"), "Delete", "Global") add list to table as row(&test1, 0, 0, %one) plugin command("TableCommands.dll", "delete from table", &test1, "Column", 0) plugin command("TableCommands.dll", "delete from table", &test1, "Column", 0)
The script above adds the lists contents to a table as a row. However, notice the empty spaces in column 0 and 1.
This is why the two delete form table commands have been added. Running the entire script will populate the table with the lists' contents, and then remove columns 0 and 1. We have added two delete from table commands because deleting the column 0 moves the rest of the script up. Column 1 row 0 becomes column 0 row 0, and the second delete from table command delete the contents of column 0 again, moving the contents of that column up to replace the empty space.