Lua 関数の CmdObj は、コマンドライン・オブジェクトに関する情報をライト・ユーザデータとして返します。
CmdObj(nothing): light_userdata:handle
Returns: nothing
コマンドライン・オブジェクトのいくつかの値を Command Line History に出力するには、以下のようなコードでプラグインを作成します。
local function main() local cmd = CmdObj() Printf("Current text in the command line: " ..cmd.cmdtext) Printf("Current cmd edit object: " ..tostring(cmd.editobject and cmd.editobject:ToAddr())) Printf("Current cmd destination: " ..tostring(cmd.destination and cmd.destination:ToAddr())) Printf("Current user of the command line: " ..tostring(cmd.user and cmd.user:ToAddr())) Printf("Current profile of the command line: " ..tostring(cmd.profile and cmd.profile:ToAddr())) Printf("Current DMX readout: " ..cmd.dmxreadout) Printf("Current amount steps: " ..cmd.maxstep) Printf("Current selected object: " ..tostring(cmd:GetSelectedObject() and cmd:GetSelectedObject():ToAddr())) end return main