passing jscript arrays TO Automation servers 
Author Message
 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?



Thu, 26 Aug 2004 07:58:37 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Passing Server Array to Client JScript

2. Passing arrays to COM java objects from JScript (Server Side)

3. Passing Array from JScript to COM Server

4. Passing Array from JScript to COM Server

5. Passing arrays from a server-function/sub to a server -variable

6. Help converting server-side VBScript array into client-side JScript array

7. Automation server can't create object - Microsoft JScript runtime (0x800A01AD)

8. Automation Servers/JScript & IE

9. Question re:Ole Automation, JScript and web servers

10. Jscript error: Automation Server can't create object

11. Automation Server Can't Create Object / JScript

12. JScript runtime error: Automation server can't create object

 

 
Powered by phpBB® Forum Software