grandMA3 User Manual Publication

StartProgress(string)

grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » StartProgress(string)
Version 2.1

Description

The StartProgress Lua function creates and displays a progress bar on all screens. A string input argument creates a title for the progress bar. The function returns a handle that is used to further interact with the progress bar.

Executing the function displays the progress bar on the screens. It only disappears using the StopProgress function - which needs the handle. So it is highly recommended to store the returned handle from the start function.

See the ProgressBar topic for more info regarding progress bars and links to other related functions.

Arguments

  • String:
    The string is used as the title for the progress bar.

Return

  • Handle:
    The returned handle is the identifier for the progress bar.

Example

This creates and displays a progress bar on all screens. The progress bar does not disappear using this example - see the example in the StopProgress (link above) function to remove:

Lua
return function()
-- Create and display a progress bar with a title
-- IMPORTANT: The Lua variable 'progressHandle' is needed to remove the progressbar again - StopProgress()
progressHandle = StartProgress("ProgressBar Title")
end
Important:
Running this example multiple times creates new progress bars that cannot be removed. So only run this once, and then remove it again using the StopProgress function (link above).