Lua 関数の GetAttributeIndex は、アトリビュートのシステム名に基づいて Attribute Definition のインデックス番号(0ベース)を返します。
この例では、アトリビュートのインデックス番号が存在する場合、それを Command Line History に出力しています。
return function()
-- store the returned index or nil of "Gobo1"
local attributeIndex = GetAttributeIndex("Gobo1")
-- Check if the returned value is not nil and print a useful feedback
if attributeIndex~=nil then
Printf("Attribute is index number %i", attributeIndex)
else
Printf("The attribute is not found")
end
end