Refreshing the Listbox using scripting - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Sandy
Posts: 15
Joined: Tue Jun 16, 2009 8:02 am

Refreshing the Listbox using scripting

Hello,

I am successfully inserting Values in a Listbox from within a VBScript. I'm using the "Twin Dialog" method to refresh the Listbox. As suggested in one of your responses on the forum, I have 2 published events (1) a DoAction which calls and executes my script and (2) the NewDialog event which shows the "Twin Dialog".

For reference, I have also downloaded the samples (DualListExample & ComboListExample) provided. They have proven to be very helpful. However, I do have a problem...

My script processes "n" number of files. After each file is processed, I want to insert a value in the listbox and display the refreshed listbox. However, I see the refreshed values only after all the files have been processed. I suppose this is because the second published event does not get triggered until after the script has run its course.

I realize that the option is for the script to process one file at a time. But this would mean pushing the button "n" times to process each file separately just to see the refreshed listbox values.

Is there a way I can resolve this problem? Can I call the NewDialog event from within my script or is there any other solution?

Thanks & Regards,

Sandy
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Refreshing the Listbox using scripting

Hi Sandy,

Unfortunately a listbox cannot be refreshed while it's being populated by a custom action. This is not supported by Windows Installer. The listbox entries can be inserted either all at once or one at a time, each time clicking a button.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Sandy
Posts: 15
Joined: Tue Jun 16, 2009 8:02 am

Re: Refreshing the Listbox using scripting

Hello,

I've managed to modify my script accordingly.

Thanks for your prompt support.

Regards,

Sandy

Return to “Common Problems”