hi, david, i’m making custom toolbar based on this example and i wanted to add option to run a script. i avoided app.command.RunScript
and used dofile
as you recommended here: Opening one script with another - #3 by dacap with just a file name.
when alone in script it works fine, but here in dialog, when i wrap dofile
in a function, i get an error message: cannot open xxx.lua: No such file or directory
. to run a script i have to insert absolute path like this:
:button{text="run",onclick=function() dofile( path .. 'xxx.lua') end}
i’d prefer not to do that, what is the correct way to use relative path here?