Progress.SetText

Progress.SetText ( 

string ObjectName,

string Text )

Example 1

-- 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");

-- Calculate the percent complete:
nPercentComplete = ((nCurrentPos - tRange.Begin) / (tRange.End - tRange.Begin)) * 100;

-- Set the current text to reflect the percent complete
Progress.SetText("Status", nPercentComplete .. "%");

-- Check to see if any errors occurred calling the Progress.SetText 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

Gets the current position and range of the "Status" progress meter and calculate the percent complete.  Sets the text to the percent complete and checks for errors.

See also:  Related Actions