OverviewExamples
table Progress.GetRange ( |
-- Store the current position in nCurrentPos
nCurrentPos = Progress.GetCurrentPos("Status");
-- Store the range in a table: tRange
-- Indexed by tRange.Begin and tRange.End
tRange = Progress.GetRange("Status");
-- Check to see if any errors occurred calling the Progress.GetRange action.
-- If any error occurred, display the error message.
error = Application.GetLastError();
if (error ~= 0) then
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
end
-- Calculate the percent complete:
nPercentComplete = ((nCurrentPos - tRange.Begin) / (tRange.End - tRange.Begin)) * 100;
Gets the current position and range of the "Status" progress meter and calculates the percent completed.
See also: Related Actions