I have some string variables in a .js file that I would like to save as BTT persistent string variables.
The code of this .js file is a Cubase MIDI Remote API Script, written in the ES5 version of JavaScript.
This .js file is always executed from this DAW (Cubase).
If I write the following code in this .js file, it gives me an error:
(async ()=> {
let result = await set_persistent_string_variable({variable_name: 'test', to: "this is a test value"});
returnToBTT(result);
})();
Executing the same code in Apple Script editor (selecting Javascript) doesn't give any error.
The result is "[object Promise]" and no BTT variable called "test" is created.
As I am very bad with javascript, I don't know if I am doing something wrong, or there is a bug in this code.
All I want to do is to save some js string variables as BTT persistent variables.
If that's not possible, I would like to save these js string variables in an external file (txt or plist) for working with them.
Thanks in advance!