
passing jscript arrays TO Automation servers
Copy it to a Scripting.Dictionary object whose items() method returns a SAFEARRAY.
var arr = new Array()
arr[0] = "Mic"
arr[1] = "key"
arr[2] = "Mouse"
var d = new ActiveXObject("scripting.dictionary")
for(var i=0; i<=arr.length; i++ )d(i)=arr[i]
// d.items() returns a SAFEARRAY
--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--
Quote:
> Using jscript to communicate with an automation server and
> need a way to package a byte stream. I've figured out how
> to get a SafeArray from the server and convert it to a
> jscript array but cannot figure out how to convert a
> jscript array to a SafeArray to pass the other way.
> VBArray appears to only be creatable with an existent
> SafeArray.....Suggestions? Documentation on this?