It is currently May 29th, 2023, 9:01 pm

Is it possible to use inline Lua via InputText's OnDismissAction?

Discuss the use of Lua in Script measures.
Crest
Posts: 105
Joined: August 16th, 2013, 12:47 pm

Is it possible to use inline Lua via InputText's OnDismissAction?

Post by Crest »

What I'm finding is that calling a script function doesn't work for OnDismissAction, instead it errors in the log with Not a valid function name: <name of function>. Is this expected and is there any other way to trigger a script function on dismiss?

Eg: this fails (it makes no difference changing the function name):

Code: Select all

[Input]
Measure=Plugin
Plugin=InputText
...
OnDismissAction=[&Script:foobar()]
Where Script is the name of the Lua script measure defined elsewhere in the code that works for other InputText actions like Command1, etc.
Last edited by Crest on May 23rd, 2023, 10:23 am, edited 1 time in total.
Crest
Posts: 105
Joined: August 16th, 2013, 12:47 pm

Re: Is it possible to use inline Lua via InputText's OnDismissAction?

Post by Crest »

*Facepalm*

I'd forgotten I have two scripts defined and was calling the wrong one for OnDismissAction, so no wonder it errored.

Hopefully useful to anyone else searching for the error who had a similar brainfart.