a=PROGRESS(amount) (returns 1 for abort requested) (amount is of y2-y1)
When a script is invoked, F/x takes note of the vertical extent of the area selection the user makes. It sets the progress bar so that the bar will go from empty to full following "amount" from zero to the number of Y lines, minus one.
There are several ways this can be used, but the most straightforward is to get the Y selection extents, and then process the selection, passing (Y-Y1) to the progress function.
Here's an example of how you might use the PROGRESS() command just that way:
10 REM Demonstrates how to process an area selection
20 REM performs color negative function
30 X1=GETX1(0): Y1=GETY1(0)
40 X2=GETX2(0): Y2=GETY2(0)
50 FOR Y=Y1 TO Y2
60 A=PROGRESS(Y-Y1): IF A=1 THEN END
70 FOR X=X1 TO X2
110 NEXT X
120 NEXT Y