Hi Guys...I'm trying to populate a combobox based on how many images are in a directory....
--Populate a table with jpg files from the Image directory and count their numbers
tbl_path = File.Find("AutoPlay\\Images\\PowerPoint\\", "*.jpg", false, false, nil, nil);
img_nbr = Table.Count(tbl_path);
ComboBox.SetUpdate("Plugin2", false);
for i = 1, img_nbr do
ComboBox.AddItem ("Plugin2", "Slide "..img_nbr,"");
end
ComboBox.SetUpdate("Plugin2", true);
In this case I have 24 images in the directory...trouble is it just repeats slide 24.....24 times in the combo box....I want it to update the combo box with slide1 to slide24 ?
Any ideas on what I'm doing wrong?
Thanks a lot for any help
Octane
--Populate a table with jpg files from the Image directory and count their numbers
tbl_path = File.Find("AutoPlay\\Images\\PowerPoint\\", "*.jpg", false, false, nil, nil);
img_nbr = Table.Count(tbl_path);
ComboBox.SetUpdate("Plugin2", false);
for i = 1, img_nbr do
ComboBox.AddItem ("Plugin2", "Slide "..img_nbr,"");
end
ComboBox.SetUpdate("Plugin2", true);
In this case I have 24 images in the directory...trouble is it just repeats slide 24.....24 times in the combo box....I want it to update the combo box with slide1 to slide24 ?
Any ideas on what I'm doing wrong?
Thanks a lot for any help
Octane
Comment