Progress.StepIt

Progress.StepIt (

string ObjectName )

Example 1

-- Set the progress bar range from 0 to 50
Progress.SetRange("Status", 0, 50);

-- Set the current position to 0 (the beginning)
Progress.SetCurrentPos("Status", 0);

-- Set the step size to 10
Progress.SetStep("Status", 10);

-- nLoopControl is used to control the loop below
nLoopControl = 5;

-- Do the following as long as nLoopControl is greater than 0
-- In this case, this loop will be performed 5 times
while nLoopControl > 0 do
-- Increment the current progress
Progress.StepIt("Status");

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

-- Subtract 1 from nLoopControl
nLoopControl = nLoopControl - 1;
end

Sets the range of the "Status" progress meter from 0 to 50, sets the step size to 10, sets the current position to 0, and steps the progress meter five times.

See also: Related Actions