activeperl@listserv.ActiveState.com
[Top] [All Lists]

RE: OLE Question.

Subject: RE: OLE Question.
From: "joe"
Date: Fri, 18 Feb 2005 00:17:47 -0500
At a guess...

$objConnection = $objConnections('My New Connection');
 

-----Original Message-----
From: activeperl-bounces@xxxxxxxxxxxxxxxxxxxxxxxx
[mailto:activeperl-bounces@xxxxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Devin
Smith
Sent: Wednesday, February 16, 2005 6:15 PM
To: activeperl@xxxxxxxxxxxxxxxxxxxxxxxx
Subject: OLE Question.

Hi list,

Not sure if this is off topic but I have a question about converting a
VBScript into Perl(Script). I can't figure out how one would go from
converting a few lines like the following to Perl:

In VBScript
===========
Dim objConnections
Dim objConnection

Set objConnections = CreateObject("AnObject.Connections")
   If IsObject(objConnections) Then
      If objConnections is Nothing Then
         WScript.echo "CreateObject failed."
      Else
        WScript.echo "CreateObject successful."
      End If
   End If

Set objConnection = objConnections("My New Connection")

In Perl
===========
my $objConnections;
my $objConnection;


$objConnections = Win32::OLE->new("AnObject.Connections")
    or die Win32::OLE->LastError;
print "Creation successful.\n";

I don't know how here to set $objConnection.

Thanks in advance,

--
Devin Smith

_______________________________________________
ActivePerl mailing list
ActivePerl@xxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
ActivePerl@xxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

<Prev in Thread] Current Thread [Next in Thread>