I am working on a script that will display a custom progress bar using a SUD dialog box. The script uses a For loop inside the dialog box to iterate through a list of files in a folder and display each file name during the loop while also advancing the progress bar. Stripping the For loop down to the basics of this discussion, it looks like this:
for each file in fldr.Files
Text2.Text = file.Name
next
However, once I run the script that calls the sud file, the dialog box will not be shown until the For loop is finished, at which point Text2.Text shows the last file in the folder. I have been searching relentlessly for a way to bring the dialog box up immediately once the script runs to allow the Text2 object to show each file name during the loop, but I've failed. Any ideas what I'm missing here?