List Box Object - Add

Adds new items to a selected List Box Object.

Action ID:
Action Category:
Action List Syntax:

118
List Box Object
ListBoxObject.Add (<<ADDTYPE>>, <<ITEM>>)

Settings

List Box

Name:

The name of the List Box Object that you want to add items to.

Add at Position

The position in the list where you would like to add the new items. Choose from:

Start

-

Add the item(s) to the start of the list.

End

-

Add the item(s) to the end of the list.

Specific position

-

Add the item(s) at the position specified in the Index field.

Index:

The zero-based index where the new items will be added in the list. A value of 0 will add the items to the beginning of the list, and a value of -1 will add the items to the end of the list.

NOTE

 

 

 

The action will automatically compensate for out of bounds indexes: anything less than -1 will go to the start of the list, and anything greater than the number of items in the list will go to the end of the list.

If the list has the Sort option turned on, the Index setting has no effect.

Items

Items to add:

The item (or items) to add to the List Box Object. To add multiple items, use a delimited list and specify the delimiter in the Delimiter field.

NOTE

 

 

 

This action will NOT add empty items to the list. Any empty items are simply ignored.

You can associate a data member with each item by separating the data from the item with a double colon (::) and putting the data after the item.

For example:

Apple::Fruit;;Orange::Fruit;;Carrot::Veggie;;Tomato::Unknown

...would add "Apple", "Orange", "Carrot", and "Tomato" to the List Box Object as list items, and would associate each of these items with a data member, like so:

Apple

->

Fruit

Orange

->

Fruit

Carrot

->

Veggie

Tomato

->

Unknown

You could then use a "List Box Object - Get Item Data" action to get the data associated with one of these items.

Delimiter:

The delimiter that you used to separate items in the Items to add field. If the text in the Items to add field is not a delimited list, you can leave this field blank.

Error Codes

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

MSG_ERR_LIST_BOX_OBJECT_ADD_ITEM

MSG_ERR_LIST_BOX_OBJECT_ADD_ITEM
MSG_ERR_OBJECT_NOT_FOUND
<<LISTNAME>>

2

MSG_ERR_LIST_BOX_OBJECT_ADD_ITEM

MSG_ERR_LIST_BOX_OBJECT_ADD_ITEM
MSG_ERR_LIST_BOX_OBJECT_UNAVAILABLE
<<LISTNAME>>

Examples

Adding items to a list box (with data)

Displaying a list of open windows