Most batch scripts are just running a few milli seconds or seconds, so no need to report any progress back to the user. However, especialyl (but not only) long running scripts should somehow feed back to the user how much progress they made and what they are currently doing.
For that purpose an instance of an IProgressMonitor named "progressMonitor" is passed to he script. It basicaly gives the script access to the monitor that is visualized in the modal dialog that is open while the script is running.
I just have posted a simple script here to illustrate the possibilities.
Happy Progress Reporting
Jan