1
General Board / Re: ActiveX vs COMObject and Javascript
« on: August 04, 2022, 10:49:52 am »(my emphasis)PS. I hope they never stop supporting VBScript because that would mean years of code to be rewrittenUnlikely to happen. What has happened is that the Microsoft components that EA relies on to debug VBScript and JScript are effectively dead. By contrast, the Javascript support is fully contained within our codebase, so that's recommended.
I use VBScript extensively (though not exclusively) because it has ByRef parameter passing. I couldn't see how to do that in JScript. Is it possible?Yes, it is. All variables and arguments are assigned by value, but for objects, the value of the variable is a reference. So to pass something by reference, all you need to do is wrap it in an object and pass that.
I already knew that, but that was a shirtload of work to just get a string passed ByRef. If I were a masochist, I could do the same in VBScript, so your comment is correct but useless.
Nevertheless, based on your point about the Microsoft components, we'll have to start planning the changeover.
Paolo