I recently moved from WaveLab Pro 9 to 11 and I can no longer get the “Record” command to work
properly using ActiveX scripting. I used this for a few years in WaveLab Pro 9 without any problem.
My script to open the Record window is called from VBA code in Microsoft Access as follows:
Set oWavApp = CreateObject("WaveLab9_1.Application")
While oWavApp.IsReady() = False
DoEvents
Wend
Set oRecordWindow = CreateObject("WaveLab9_1.Recorder")
oRecordWindow.Open "Wave - 44.1 - 16-bit (Record)" ' WAV Preset
oRecordWindow.Record "W:\temp\Test1.wav"
WaveLab 9 will then open and start Recording to the Test1.wav file.
Running the same code for WaveLab 11 (replacing “WaveLab9_1.Recorder” with “WaveLabPro11.Recorder”)
will open the Record window but does not start Recording the Test1.wav file.
If I then manually press the Record button it pops a message saying the file is already
Opened so it can’t Record to it.
It seems like it is opening the file somehow in the background first
before the Record window opens because if I add these 3 additional lines after the last
oRecordWindow.Record statement then it works.
oRecordWindow.Discard
Sleep 1000
oRecordWindow.Record "W:\temp\Test1.wav"
So this is a workaround for me at the moment but is not ideal since I have to call
oRecordWindow.Record twice and also hope that the Sleep time is enough to allow
the “open” file to be Discarded before the 2nd .Record command.
In addition, I also notice that if I try to Record to a FLAC file instead of WAV,
the .Discard and .Stop commands do not work at all and just leaves the FLAC file Open.
I have to Exit Wavelab before I can access the FLAC file.