This is a child page. You can use Parent in the quick nav bar at the top or the bottom of the page to navigate directly back to the parent of this page. Some child pages are more than one level deep, and in that case will require more than one Parent click to reach the outermost document level.

§ 16.96.15 - Utility functions for your scripts

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 80 A=PUTRED(X,Y,255-GETRED(X,Y)) 90 A=PUTGREEN(X,Y,255-GETGREEN(X,Y)) 100 A=PUTBLUE(X,Y,255-GETBLUE(X,Y)) 110 NEXT X 120 NEXT Y
Keyboard Navigation
, Previous Page . Next Page t TOC i Index o Operators g Glossary
WinImages F/x, Morph and all associated documentation
Copyright © 1992-2007 Black Belt Systems ALL RIGHTS RESERVED Under the Pan-American Conventions
WinImages F/x Manual Version 7, Revision 6, Level A

Valid HTML 4.01 Loose

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7
Page 273