Add List to List
(Created page with "Add List to List is a Data Command. This command will append a list to the end of a list. The settings on the command allows you to: Delete Duplicates: A...") |
|||
(13 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
Add List to List is a [[Data Commands|Data Command]]. | Add List to List is a [[Data Commands|Data Command]]. | ||
− | This command will append a list to the end of a list. | + | This command will append a list of data to the end of a specified list. |
− | The | + | '''Starting List:''' The list the information will be appended to. |
− | + | '''List to Add:''' The list of information being appended to the starting list. The command also accepts variables and functions such as [[$next list item]], [[$list item]], [[Scrape Attribute]], [[$random list item]], [[$previous list item]], and [[$table cell]]. | |
− | List Scope: Allows you to decide if you want your list to be local to the command or script it | + | The additional advanced settings are the following: |
+ | |||
+ | '''Delete Duplicates:''' Allows you to set deleting duplicates in a list to Delete or Don't Delete | ||
+ | |||
+ | '''List Scope:''' Allows you to decide if you want your list to be local to the command or script it occupies or global to the entire bot. | ||
Line 20: | Line 24: | ||
− | The script above will append the list in the | + | The script above will append the list in the [[$list from text]] function to the end of the list name %one. |
+ | |||
+ | |||
+ | [[File:altl.jpg]] | ||
+ | |||
+ | |||
+ | To scrape a list of results to a list, simply insert the [[Scrape Attribute]] command into the add list to list command in the field for List to Add. | ||
+ | |||
+ | <pre> | ||
+ | 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") | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | The results of the scrape are added to the list as individual list items. | ||
− | [[File: | + | [[File:altl0.jpg]] |
Latest revision as of 15:57, 16 January 2014
Add List to List is a Data Command.
This command will append a list of data to the end of a specified list.
Starting List: The list the information will be appended to.
List to Add: The list of information being appended to the starting list. The command also accepts variables and functions such as $next list item, $list item, Scrape Attribute, $random list item, $previous list item, and $table cell.
The additional advanced settings are the following:
Delete Duplicates: Allows you to set deleting duplicates in a list to Delete or Don't Delete
List Scope: Allows you to decide if you want your list to be local to the command or script it occupies or global to the entire bot.
[edit] Example
add list to list(%one, $list from text("apples,persimmons,kiwi,figs,cashew", ","), "Delete", "Global") add list to list(%one, $list from text("soursop,blackberries,pomegranates,oranges,melon", ","), "Delete", "Global")
The script above will append the list in the $list from text function to the end of the list name %one.
To scrape a list of results to a list, simply insert the Scrape Attribute command into the add list to list command in the field for List to Add.
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")
The results of the scrape are added to the list as individual list items.