List Processing Functions

InstallShield 2014 ยป InstallScript Language Reference

Lists are used to store groups of related information. In InstallScript, there are two types of lists: string lists and number lists. Two sets of functions are provided to work with lists, one for each list type. List functions that end with "Item" operate with number lists. List functions that end with "String" operate with string lists. You cannot use number list functions on string lists and vice versa. Below are the functions to implement lists in a setup script.

List Processing Functions

Function

Description

ListAddItem

Adds an item to a list.

ListAddString

Adds a string to a list.

ListCount

Returns the number of string or numeric elements in a specified list.

ListCreate

Creates a new string or number list.

ListCurrentItem

Returns the current item in a list.

ListCurrentString

Returns the current string in a list.

ListDeleteItem

Deletes the current item in a list.

ListDeleteString

Deletes the current string in a list.

ListDestroy

Destroys a list.

ListFindItem

Makes the specified item the current item in a numeric list.

ListFindKeyValueString

Searches a string or number list for a specified value. It returns a value from an additional list that corresponds with the position of the found string in the first list.

ListFindString

Makes the specified item the current item in a string list.

ListGetFirstItem

Retrieves the first element from a number list.

ListGetFirstString

Retrieves the first string from a string list.

ListGetNextItem

Retrieves the element after the current element from a number list.

ListGetNextString

Retrieves the element after the current element from a string list.

ListReadFromFile

Reads a text file into a list.

ListSetCurrentItem

Sets the current element of a number list.

ListSetCurrentString

Sets the current element of a string list.

ListSetIndex

Uses an index to set the current element of a list.

ListValid

Indicates whether the specified list is valid.

ListValidType

Indicates whether the specified list is valid and is of the specified type.

ListWriteToFile

Writes a string list to a file.

ListWriteToFileEx

Writes or appends a string list to a text file as Unicode or ANSI, depending on the constants that you provide for the nOptions parameter.