I'm having trouble understanding 'one time scripts'.
I have some basic lua experience and I've googled for lua script examples and so far I found only mix and telemetry scripts. Together with what's in the reference manual I believe I have a basic understanding how to implement those. However one time scripts seem are a mystery to me.
The reference guide is has a single page on one time scripts and no examples. It seems like the only way to invoke them is through executing them directly from the SD card. I really don't know how to start such a script from 'a specific radio function or when the user selects them from a contextual menu' as it is written in the reference guide.
It seems to me like they should look more or less like wizard scripts, but I can get even the simplest script working.
I tried this as a 'hello world' example:
Code: Select all
local function run(e)
print("ḧello world")
end
return{run=run}
Code: Select all
lcd.drawText(1, 0, "Hello world", 0)
.
But all I get is a 'Script syntax error'
Does anyone know of a simple example of a 'one time script' and how to invoke them?