Add and register a new command to the command line with the given lua callback. The command is enabled on adding. Returns false if command name already exists.
local clicommand = mainWindow:cliCommand() clicommand:addCommand("SayHi", function() message("Hi!") end)
Write a message to the command line.
message("Text")
function actually calls this function to print a message to the clicommand.
clicommand:write("Test Message")
Run the command i.e. run the lua callback corresponding to the given command. Dosen't do anything if command is not present or disabled.
clicommand:runCommand("LINE")
Enable the given command. Dosen't do anything if command dosen't exist.
clicommand:enableCommand("LINE")
Disables the given command. Dosen't do anything if command dosen't exist.
clicommand:disableCommand("LINE")
Returns a boolean indicating whether the command is enabled or disabled.
local enab = clicommand:isCommandEnabled("LINE")
Returns a list of all available command names.
local allcommands = clicommand:availableCommands() for k,v in pairs(allcommands) do cliCommand:runCommand(v) end
Returns a list of all commands that have been entered since program started.
local history = cliCommand:commandsHistory()
Clear the cli command console. Can also be accessed by using command “CLEAR” in the command line.
cliCommand:clear()