Scripting - master section not loading presets

Hi, I was trying to get started with scripting my workflow, but WaveLab doesn’t seem to be doing what I ask it to do in the master section. I wrote this highly advanced script:

application.setResponsiveUi(1);
logWindow.clear();
logWindow.printInfo("Script started");
masterSection.reset();
logWindow.printInfo("Script finished");

and when I run it, nothing happens. (I do see the log messages in the Log window, but no errors or warnings.)

(I also tried masterSection.loadPreset("a name that exists");, but that didn’t do anything either.)

Should this work, or am I doing something else wrong here?

I noticed that when I manually load a preset, it brings up an options page for what parts of the preset I want to load, so I wondered if maybe I should give more arguments to specify those options, but the documentation doesn’t mention any, and nothing changed when I unchecked “Open Options Dialog When Selecting Preset”, so I’m not sure if I can do anything there.

(WL 10.0.70, Mac Catalina 10.15.7)

The Master Section are removed, when I run your little script.

Hmm. I must be doing something else wrong, then. Is there any sort of preference or setting that I should check to make sure I haven’t disabled master-section scripting, or locked the master section, or something?

Is there any sort of interactive REPL for the scripting, or do I just test via “run script” and logging?

I tried this again this morning, and .reset() worked, but loading presets still didn’t.

But I realized that that’s because I can’t do masterSection.loadPreset("my-preset");; I have to do masterSection.loadPreset("my-preset.dat");. When I try it without the .dat, nothing happens; I would have expected an error message in the console log.

Anyway, this is working for me now. Thanks.