dialog.SelectSegments[edit source]

table dialog.SelectSegments()
Prompt for segment selection, get a list of segment indices.
V1 Function Name
New to V2

dialog.SelectSegments prompts the user to select segments, and returns a list containing the indices of the selected segments. It's the equivalent of a user pick for the segments ingredient in a GUI recipe.

dialog.SelectSegments is part of the dialog namespace, but it's separate from the other functions. It does not require or work with dialog.CreateDialog or dialog.Show.

Example[edit | edit source]

The Lua code:

segs = dialog.SelectSegments ()
print ( #segs .. " segments selected" )
seglst = ""
for ii = 1, #segs do
    seglst = seglst .. segs [ ii ]
    if ii < #segs then 
        seglst = seglst .. ","
print ( "segments = \"" .. seglst .. "\"" )

Produces output like:

7 segments selected
segments = "10,12,25,50,65,71,76"
Community content is available under CC-BY-SA unless otherwise noted.