| grandMA3 ユーザマニュアル » プラグイン » Lua 関数 - Object-Free API » ClassExists(string) | Version 2.2 |
ClassExists 関数は、指定された文字列がクラスであるかどうかを示す boolean 値を返します。
"Display" という単語がクラスであるかどうかを尋ね、適切なフィードバックを返します。
Lua |
return function() -- Store a string with the class name local className = "Display" -- Check if the class exists and then provide proper feedback if ClassExists(className) then Printf("The class '%s' exists", className) else Printf("The class '%s' does not exists", className) end end |