I've done this before, but it wasn't nearly good enough to use in a real application. I believe I had the script keep updating a variable or a field with its calculated % progress, and then I had a gauge that tracked the progress. As I recall, the problem was that while the script was executing, actual display updates were rare, so even if the script took half a minute to run and updated the variable 100 times during that half a minute, I might only see the chart update three times. Also as I recall, I could fix that problem by forcing a wait for idle after every progress update. But then what happened was a half a minute script turned into a five minute script. All numbers are made up since I don't remember the exact situation, but it was something along those lines.
So no, I don't have a solution. I hope someone has a better idea, or maybe there's a way to get my idea to work, but I had no success.