Online Help
The Progress object plugin for AutoPlay Media Studio 5.0 Professional Edition makes it incredibly easy to add a powerful progress meter to your projects. Simply drop into onto your page and you've got a very slick looking way to display progress feedback, just like you've seen in many other professional products.
Whether you need to show a percentage of a completed task, or a simple indicator guage to keep your user's informed, this is a great way to do it. Of course, we didn't stop with just a simple plain looking progress meter - we've made it really easy to customize. You can control the background and bar colors, text, fonts, vertical or horizontal orientation, step size, min and max values, and a variety of styles such as standard or XP look.
Orient the progress bar horizontally. The progress meter will move from left to right.
Orient the progress bar vertically. The progress meter will move from the bottom to the top.
Use bars to represent the progress.
Use a solid bar to represent the progress.
The minimum value for the range of the progress meter.
The maximum value for the range of the progress meter.
The value to increment each time progress is made.
The background color to use for the object. You can click the select button to bring up a color chooser.
The color to use for the progress meter bars. You can click the select button to bring up a color chooser.
Use an XP style progress meter.
The text you want to appear inside the object.
The text color to use. You can click the select button to bring up a color chooser.
The font that you want to use for the text. Click the Select Font button to open the Font dialog where you can edit all of the font settings.
Fires whenever the user clicks on the object.
Progress.GetCurrentPos
Progress.GetRange
Progress.GetText
Progress.SetCurrentPos
Progress.SetRange
Progress.SetStep
Progress.SetText
Progress.StepIt
Returns the current position of the progress meter within the progress bar.
(string) The name of the progress object.
(number) The current position of the progress meter within the progress bar. If an error occurs -1 is returned.
-- Store the current position in nCurrentPos
nCurrentPos = Progress.GetCurrentPos("Status");
-- Check to see if any errors occurred calling the Progress.GetCurrentPos 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
Returns a table containing the range of the progress bar.
(string) The name of the progress object.
(table) A table containing the range of the progress bar, indexed by values "Begin" and "End". These values can be accessed using the form mytable.Begin and mytable.End. If an error occurs, nil is returned.
-- 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;
Returns the text currently displayed on the progress object.
(string) The name of the progress object.
(string) The text currently displayed on the progress object. If no text is displayed or an error occurs, an empty string ("") is returned.
-- Get the current text from the Progress Bar
sCurrentText = Progress.GetText("Status");
-- Check to see if any errors occurred calling the Progress.GetText 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
-- Print the current text to the debug window
Debug.Print("Progress Text: " .. sCurrentText .. "\r\n");
Sets the position of the progress meter within the progress bar.
(string) The name of the progress object.
(number) The position you want to set.
Nothing. You can use Application.GetLastError() to determine whether this action failed, and why.
-- Get the current position
nCurrentPos = Progress.GetCurrentPos("Status");
-- Increment the current position
Progress.SetCurrentPos("Status", nCurrentPos + 1);
-- Check to see if any errors occurred calling the Progress.SetCurrentPosition 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
Sets the range of the progress bar.
(string) The name of the progress object.
(number) The beginning of the range.
(number) The ending of the range.
Nothing. You can use Application.GetLastError() to determine whether this action failed, and why.
-- Set the progress range from 0 to 100
Progress.SetRange("Status", 0, 100);
-- Check to see if any errors occurred calling the Progress.SetRange 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
Sets the step value that will be used whenever Progress.StepIt() is called.
(string) The name of the progress object.
(number) The step value to use.
Nothing. You can use Application.GetLastError() to determine whether this action failed, and why.
-- Set the step value to 10
Progress.SetStep("Status", 10);
-- Check to see if any errors occurred calling the Process.SetStep 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
Sets the text currently displayed on the progress object.
(string) The name of the progress object.
(string) The text you want to display on the progress object.
Nothing. You can use Application.GetLastError() to determine whether this action failed, and why.
-- 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
Increments the current progress by the step amount specified in the Progress.SetStep() action.
(string) The name of the progress object.
Nothing. You can use Application.GetLastError() to determine whether this action failed, and why.
-- 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
1100 - Could not find the specified plugin object or the plugin object is of the wrong type.
Indigo Rose Corporation
support.indigorose.com
The Progress Object Plugin is copyright © 2003-2004 Indigo Rose Software Design Corporation.
Copyright © 2003-2004 Indigo Rose Software Design Corporation.
All Rights Reserved.