| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » GetUIChannelIndex(integer, integer) | Version 2.2 |
GetUIChannelIndex 関数は、指定された2つのインデックス番号にマッチするUIチャンネルのインデックス番号を返します。
現在のセレクションにある最初のフィクスチャの Dimmer アトリビュートに対するUIチャンネル・インデックスを出力します。
Lua |
return function() -- Get the Attribute index and UIChannel indexes local attributeIndex = GetAttributeIndex("Dimmer") local uiChannelIndex = GetUIChannelIndex(SelectionFirst(),attributeIndex) -- End the function if any of the index return nil if (attributeIndex == nil or uiChannelIndex == nil) then ErrPrintf("Something went wrong, maybe your first selected fixture don't have a Dimmer - Please try again") return end Printf("The UI Channel Index is " .. uiChannelIndex) end |