Hi there!!
I have a .vbs script that allows to open a several number of audio files and disconnect it from the master section (Ctrl-M) on a selected Tab Group, which is very useful if you need to compare your mastering with a huge number of audio files.
Basically I have taken the MP3 example and added a KeyShortcut object that executes on every instance of the loop after the wave.open instruction.
I’ve also added a WScript.Shell object just to call the AppActivate argument to ensure that the focus is in the Wavelab application and the KeyShortcut works fine.
The problem is, even if I’m calling a Wavelab7.Application, KeyShortcut or Wave object, it doesn’t opens Wavelab 7, it opens only Wavelab 9, so when I run my script, It only works for Wavelab 9, the last version I’ve installed.
I’ve been testing with some friends that also have Wavelab 7, 8.5 and 9 installed, and for each one of them opens a different version of Wavelab !!.. 7_64 bit, 8.5, 9, etc. It seems to be completely random, I could’t find a pattern or explanation for that.
It’s very important for me to open the script with a chosen version, not a random one, any suggestion?? Here’s my code:
' This script allows you to open any files and disconnect the master section (Ctrl-m)
' Just drop the audio file to open and mute
' It opens in any random Wavelab (7, 8.5 or 9) in case you have installed more than one, still looking for a reason.
if WScript.Arguments.Count = 0 then
WScript.Echo "You need to drop an audio file on this script!..."
WScript.Quit
end if
Dim app
Set app = CreateObject("WaveLab7.Application")
While app.IsReady() = False
WScript.Sleep(100)
Wend
Dim ks
Set ks = CreateObject("WaveLab7.KeyShortcut")
Dim wave
Set wave = CreateObject("WaveLab7.Wave")
Dim ObjShell :Set ObjShell = CreateObject("Wscript.Shell")
ObjShell.AppActivate("WaveLab")
Dim i
For i = 0 to WScript.Arguments.Count - 1
Call wave.Open(Wscript.Arguments(i))
Call ks.Trigger("Wave", "Ctrl+M")
Next
Thanks a lot!!