158
www.analogway.com
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
USER MANUAL
Appendix E.
Cue macro Lua API
E.a.
Lua related console commands
lua cmd
Execute given piece of lua code, quotation marks must be escaped with a backslash.
For example, lua "dmesg
(
\"hello\"
)
; dmesg
(
\"world\"
)
"
lua_file filepath
Execute given Lua script from the filesystem.
Given filepath can be either absolute or relative.
If a relative filepath is given the script file is looked up from /picturall/media/scripts/
For example, command "lua_file my_script.lua" would execute /picturall/media/scripts/my_script.lua
E.b.
Custom Lua functions
Following Lua functions are available globally.
function
dmesg
(...)
->
nil
Write a message to all clients.
Parameters:
varargs: Accepts any number of string, number, or boolean arguments.
The varargs are concatenated before printing
function
mesg
(...)
->
nil
Write a message to the current connection.
Parameters:
varargs: Accepts any number of string, number, or boolean arguments
The varargs are concatenated before printing
function
list
()
->
nil
Print all the objects in the console.
function
dump
(
object
)
->
nil
Print debug information about the object in the console
Parameters:
object string: Name of the object to use
If the object does not exist, error is raised.
function
get_objects
()
->
table
Returns a table containing names of all the server objects.