$list from file
(Created page with "$list from file is a Variable Function. The function returns a list made up of each item within a file. This function, when combined with the [[Add Lis...") |
|||
Line 15: | Line 15: | ||
The list is populated with the items from the file. The debugger displays 6 items that have been added from from the file to the list. | The list is populated with the items from the file. The debugger displays 6 items that have been added from from the file to the list. | ||
The [[Type text|type text]] command is used along with the [[random list item]] functions to populate a file with a random item from our newly created list. | The [[Type text|type text]] command is used along with the [[random list item]] functions to populate a file with a random item from our newly created list. | ||
+ | |||
+ | == Additional Information == | ||
+ | |||
+ | To run the code for this example with a file on your system, simply change the file path in the list from file functions to the file path to the file on your system. You can also use the browse button on the function to browse for the location of your file. |
Revision as of 19:26, 15 October 2012
$list from file is a Variable Function.
The function returns a list made up of each item within a file. This function, when combined with the add to list to list command, pulls information from a file into a list. Items are separated by a new line in the list.
Example
add list to list(%my list, $list from file("C:\\Users\\LillyT\\Desktop\\my file.txt"), "Delete", "Global") type text(<about me textarea>, $random list item(%my list), "Standard")
The list is populated with the items from the file. The debugger displays 6 items that have been added from from the file to the list. The type text command is used along with the random list item functions to populate a file with a random item from our newly created list.
Additional Information
To run the code for this example with a file on your system, simply change the file path in the list from file functions to the file path to the file on your system. You can also use the browse button on the function to browse for the location of your file.