I had a similar problem where I wanted to instantiate a
js class from vbs and I never found a way to do it directly. What I did instead was write wrapper functions in
js for each of the class methods I wanted to call - luckily I only had a few methods.
For example lets say you have a
VB class called foo with a single method called bar. Then what you do is
1.add a new VBS variable to contain the class instance
2.add a new wrapper function to create the class object and store it in the new variable
3.add a new wrapper function to call the class method using the new stored variable
example:
Code:
' VBS code
Dim vbClassVar
Function createFooClass()
Set vbClassVar = New foo
End Function
Function callBarMethod(param1, param2, paramN)
callBarMethod = vbClassVar.bar(param1, param2, paramN)
End Function
//JS code
createFooClass();
var x = callBarMethod(param1, param2, paramN);
hth
Phil