CmdObj()
Description
Section titled “Description”The CmdObj Lua function returns information about the command line object.
Argument
Section titled “Argument”This function does not have any arguments.
Return
Section titled “Return”- Handle:
The function returns a handle to the command line object.
Example
Section titled “Example”This example uses the Dump() function on the command object. It lists all the properties and lists the children and some extra examples of how the command line object can be used:
Dump()
Section titled “Dump()”The Dump() function returns a string with information about the object, for instance, the name, class, path of the object, its properties, and children.
Learn more in the Dump() topic.
| Copy CodeLua |
| ``` |
| return function() |
--Store the handle to the command objectlocal cmd = CmdObj()--Print all information about the command objectPrintf("=============== START OF DUMP ===============")cmd:Dump()Printf("================ END OF DUMP ================")--Print some selected elements from the command object - this is currently not in the online manualPrintf("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