I hope you don't mind that I put this in my build already... :]
Can e.g. random from mathlib be called easily?
Also, could a function for executing camera commands directly (exec(camera_function_to_execute(parameters, for, the, function))) be easily added?
function get_mode() local pg = getprop(49) if pg == -32764 then return "manual" elseif pg == -32768 then return "auto" elseif ...end
require "chdk"if get_mode() == "manual" then print "good choice"end
math.random will be defined in lmathlib.c.
include 'require' support to load arbitrary Lua Sub-Scripts. This will really rock.
(I might like the ability to call any camera function from a Lua script. Would it make any sense?)
Lua to the trunk!
- require function (and dofile/loadfile) require loads a file out of the scripts folder. This means one can now create a library of functions and recycle this lib in scripts with a call to require "libname". (libname is the filename without '.lua' suffix)
Would chdk/lib or chdk/lualib be ok? Less scrolling, when selecting scripts. :]