@Learner – see e.g. this other thread that popped up today again (answer #23 by Vamitul PLUS answer #28 by Davey):
Jim Birkenseer
JS ScriptUI CS4: How to create an indeterminate progress bar?
http://forums.adobe.com/thread/561767?tstart=0
Additionally you need two ingredients:
1. A #targetengine statement
2. enableRedraw in the script preferences (I think, only when working on a Mac)
#targetengine "EditThisNameHere"; //NECESSARY for running a PROGRESS BAR on Macs:
app.scriptPreferences.enableRedraw = true;
Uwe