A couple of basic scripting questions

Not a direct answer to your questions, but you might want to read the following thread:
WaveLab scripting questions
It’s important to differentiate between Windows-only, ActiveX-based (“COM”) control of WaveLab and the internal scripting engine. The external scripts (on Windows) can be used for automation and edited in any way and in any language that can use ActiveX.

Regarding internal scripting, I will defer to PG for authoritative answers but have a look at @misohoza’s GitHub for VSCode.