PresetDocView:IsLastChannelRowSelected

From Moving Light Assistant
Jump to: navigation, search

IsLastChannelRowSelected()

Returns a boolean.

Available in MLA v1.3 onwards.

This function will return true if the last channel is selected in the channel list for the selected preset, otherwise will return false. Useful when iterating through the channel list.

Example.

PresetDocView:DispatchAction("Select First Channel")
channelListFinished = false
while channelListFinished == false do
-- Insert code here to do what you want with the channel.
-- Continue to next channel, or are we done.
if PresetDocView:IsLastChannelRowSelected() == true then
channelListFinished = true
else
PresetDocView:DispatchAction("Select Next Channel")
end
end

This select the first channel in the channel list and step through all the displayed channels.