$text from list

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 13: Line 13:
 
save to file("C:\\Users\\LillyT\\Desktop\\my file.txt", $text from list(%my list, ":"))
 
save to file("C:\\Users\\LillyT\\Desktop\\my file.txt", $text from list(%my list, ":"))
 
</pre>
 
</pre>
 +
  
 
[[File:textfromlist.png]]
 
[[File:textfromlist.png]]
 +
  
 
The delimiter in the list $my list is the command. Running the script changes the delimiter in the list to the colon.
 
The delimiter in the list $my list is the command. Running the script changes the delimiter in the list to the colon.
 
The list is then saved to a file.
 
The list is then saved to a file.
 +
  
 
[[File:textfromlist1.png]]
 
[[File:textfromlist1.png]]
 +
  
 
The file's contents show the delimiter has been changed from the comma to the colon.
 
The file's contents show the delimiter has been changed from the comma to the colon.

Revision as of 18:26, 21 May 2013

$list from text is a Data Function. The function returns text based on connecting each list item by a connector.

It will replace the delimiter of a list with a designated connector.

List: The desired populated list where the list items will be pulled from.

Connector: The desired connector between each list item. For example, if a comma is selected as the connector, the list items will be returned comma separated.


Example

add list to list(%my list, $list from text("list item 1,list item 2,list item 3,list item 4,list item 5,list item 6", ","), "Delete", "Global")
save to file("C:\\Users\\LillyT\\Desktop\\my file.txt", $text from list(%my list, ":"))


File:Textfromlist.png


The delimiter in the list $my list is the command. Running the script changes the delimiter in the list to the colon. The list is then saved to a file.


File:Textfromlist1.png


The file's contents show the delimiter has been changed from the comma to the colon.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox