Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Mon Jan 24, 2005 7:58 pm
Assigning OLE values in JScript/VBScript/PerlScript etc |
I'm having problems assigning an OLE value in any ActiveScript languages
I've tried the following
JScript:
Code: |
var sess = new ActiveXObject('Zmud.Application').CurrentSession;
var doodad = sess.MakeVar('doodad','','','');
doodad.OLEVal = new ActiveXObject('Scripting.Dictionary'); |
VBScript:
Code: |
Dim doodad,sess
Set sess = CreateObject("Zmud.Application").CurrentSession
Set doodad = sess.MakeVar("doodad","","","")
doodad.OLEVal = CreateObject("Scripting.Dictionary") |
PerlScript:
Code: |
use Strict;
use Win32::OLE;
my $sess = Win32::OLE->new('Zmud.Application')->CurrentSession;
my $doodad = $sess->GetVar("doodad","Shop");
$doodad->{OLEVal} =Win32::OLE->new("Scripting.Dictionary"); |
now when I open the variable editor doodad should have the value
<OLE object: Scripting.Dictionary>
to indicate that it holds a reference to the Scripting.Dictionary object
but it doesnt.
If I assign a regular string value using doodad.Value no problems
but no joy with assigning COM objects. |
|