GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The ProgressUpdate function updates the progress bar on the progress window or updates the results if running in command line mode.
Syntax/Parameters
Syntax
int = ProgressUpdate ( [int value1, [int value2] );
Parameters
value1
An optional int containing the percentage (1 to 100%) to advance the value if value2 is not provided. If value2 is provided, then value1 is presumably the count or index within the range of value2 from which the percentage is derived.
Omitting the parameter will read the cancel state (if enabled) of the progress window and allow the window to yield.
value2
An optional int used with value1 to provide a basis for progress. The progress bar will be advanced value1 percentage of value2. This relieves the script from having to calculate the progress. When this mode is used, the progress bar will only update if the percentage total changes. This value cannot be less than 1.
Return Value
Returns an int as ERROR_NONE on success, ERROR_CANCEL if the progress window is cancelled, or -1 on error. Use the GetLastError function to retrieve error information.
Remarks
Because a non-zero return value can indicate both a cancelled operation and an error, do not blindly check the return value of the ProgressUpdate function as a basis for terminating a script. If the progress window fails to open or is in use by another process, the script may be terminated on a false cancel.
The overall progress position depends on both the percentage and the number of phases. Use the ProgressSetPhase and ProgressSetPhaseCount functions to control the number and advancement of phases.
If no progress window is open or if the progress window is owned by another process when the ProgressUpdate function is called, the GetLastError function will return ERROR_SOFT.
The progress is updated (and a yield is performed) each time the percentage changes. Repeatedly calling the ProgressUpdate function is not expensive since it tracks the last displayed percent and will not update the screen if the percentage does not change. When the function is called with no parameters, the yield is processed and therefore the speed of the script can be impacted. For example, calling for a yield 10 million times during a process will affect the speed of the operation.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.