
Using a WSC to access Jscript functions from VBScript
Hi,
See this google search:
http://www.*-*-*.com/ +toJarray+group%3A*wsh
VBS arrays are SafeArrays and JScript arrays are objects.
The author wrote several conversion functions that you might need.
hth,
Mark Pryor
Quote:
> I suspect my problem is my use of Jscript here.
> I have a WSC which use for various classes I add to some VBScripts; I added a push
function which is just a wrapper around the
Quote:
> Jscript push, and get the following runtime errors attempting to use it:
> ---------------------------
> An exception of type 'Microsoft JScript runtime error: Object doesn't support this
property or method' was not handled.
Quote:
> ---------------------------
> The Jscript documentation says to check my object's documentation; I decided to skip
the recursion and just ask what the heck I did
Quote:
> wrong.
> Running the de{*filter*} shows that it gets to the push operation in the WSC, and at that
point sees the elements of an array as integer
Quote:
> values and the new element as a Long. I don't think that matters - I tried it with
strings, same problem... I'll shut up now and
Quote:
> show you the code:
> ---------------------------
> Here's my VBScript:
> set oArrays= CreateObject("arrayManip.wsc") '<--name and progid of wsc I use
> y = array(93,23,45,6)
> oArrays.jpush y,CInt(22)
> ---------------------------
> In the WSC:
> <method name="jpush">
> <PARAMETER name="arrayObj"/>
> <PARAMETER name="iData"/>
> </method>
> <script language="Jscript">
> <![CDATA[
> function jpush(arrayObj,iData)
> {
> arrayObj.push(iData);
> }
> ]]>
> </script>
> <script language="JScript">