ListGetIndex

InstallShield 2025 » InstallScript Language Reference

Project: This information applies to InstallScript projects.

The ListGetIndex function retrieves the index of the specified list's current element. Index numbers starts at zero (0).

Syntax

ListGetIndex ( listID, nIndex );

Parameters

ListGetIndex Parameters

Parameter

Description

listID

Specifies the ID of the string or number list whose current element's index is to be retrieved.

nIndex

Returns the index of the list's current element.

Return Values

ListGetIndex Return Values

Return Value

Description

>= ISERR_SUCCESS

Indicates that the function successfully retrieved the index of the list's current element.

< ISERR_SUCCESS

Indicates that the function was unable to retrieve the index of the list's current element.

ISERR_LIST_NOSUCHLIST

Indicates that a list with the specified ID does not exist. Valid list IDs are return values from the ListCreate function.

Additional Information

Use ListCurrentItem and ListCurrentString to retrieve the value of the current element.
This function works on both string and number lists.

See Also