I have a loop function in a script that looks like this:
// The path to the JPG file that will be stored in the table
Set Variable[$FilePath; Value:"Mac HD:ABC:DEF:GHI:MyPicture.JPG"]
// Creates the thumbnail and sets it in the Picture field. The TrFile function is provided by Troi Automatisering's TrFile plugin.
// This statement works, which is why I left out all the arguments.
Set Field[DBFile::Picture; TrFile_CreateThumbnail(yada yada)]
// A simple counter.
Set Variable[$Counter; Value:$Counter + 1]
// Move on to the next record
Go to Record/Request/Page[Next; Exit after last]
Commit Records/Requests 
This code works fine. But as is often the case, the customer wants more. This code saves the image to the table in the database, but the container on the screen meant to be updated with the picture does not get updated until all the images are imported. The user wants the picture to "flicker" onto the screen so that she knows that something is happening.
I have tried placing a "Refresh Window" statement in the code after the counter increment statement, but that does not work. How can I get the new image to show on the screen immediately after import and ebfore moving on to the next record?
Barring that, does Filemaker have a progress bar that can be thrown up when a lengthy process is executed?
Thanks, for whatever help you can give.