FORUMS: list search recent posts

Get Listbox contents

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Keith Fallon
Get Listbox contents
on Jan 15, 2016 at 7:02:40 pm

Hi, I'm looking for a way to get each line of a listbox.
I could possibly select everyline and use .selection
but I was hoping there was a way of getting the number of items
in the list and loop through using their index?

Since I added the lines as items I was trying the following
but to no avail:

// get the first item from the listbox
var oItem = oListbox.item[0].text;

Anyone any ideas about the correct syntax?

Return to posts index

Keith Fallon
Re: Get Listbox contents
on Jan 18, 2016 at 2:22:18 pm

I figured out how to loop through a multi column listbox and retrieve the value for a column.
// get the number of rows returned
var oNum_Items = oFoo_Listbox.items.length;

// get the AE index of each row
for( var i = 0; i <= oNum_Items; i++ )
writeLn( "Row " + i + ", AE Index: " + oFoo_Listbox.items[i].subItems[7].text );

This returns for me the AE Index column values for each row.

Row 0, AE Index: 1
Row 1, AE Index: 7
Row 2, AE Index: 3
Row 3, AE Index: 10
Row 4, AE Index: 5
Row 5, AE Index: 6

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved