Smart Package Robot 's List Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Arrays and Data-Structures > LST. - List Arrays > Text-Document Operations >

 Smart Package Robot 's List Commands

LST.TextGet - Get Container Contents as Text Document

Previous Top Next


MiniRobotLanguage (MRL)

 

LST.TextGet

Retrieve the contents of a container as a text document

 

 

Intention

 

The LST.TextGet command retrieves the contents of a container as a text document. Each element in the container is concatenated into a single string, with each element separated by a line break ($crlf). This is useful for exporting the contents of a container to a text file or for further processing as a single string.

The command takes two parameters: the handle of the container and the variable to store the resulting text document.

 

 

Syntax

 

LST.TextGet|P1|P2

 

Parameter Explanation

 

P1 - The handle of the container. This is typically a variable that contains the handle of the container.

P2 - The variable to store the resulting text document. Each element in the container is concatenated into a single string, separated by line breaks ($crlf).

 

 

Example

 

'***********************************

' LST.TextGet Sample

'***********************************
' Create a new list and add some elements

LST.New|$$LST

LST.Add|$$LST|Hello

LST.Add|$$LST|World

LST.Add|$$LST|!

 

' Retrieve the contents of the list as a text document

LST.TextGet|$$LST|$$TXT

DBP.Contents of the list: $$TXT

 

' End the script

ENR.

 

 

Remarks

 

-

 

 

Limitations:

- The container must exist and be valid.

- All elements in the container must be strings or convertible to strings.

 

See also:

 

LST.New - Create a New List

LST.TextSet - Set Container Contents from Text Document

LST.Count - Get Number of Items in Container