Argenis,

to me that looks like you didn't import the module. Sorry, I had forgotten to mention 
that: in order to be able to load the constants you would have to say

use Win32::OLE::Const;

somewhere near the start of your program. After that the error message should go away 
(and hopefully not be replaced with another).

Cheers,
Christian Sage

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet am: Freitag, 8. Juni 2001 13:59
An: Sage, Christian
Betreff: Re: AW: problems whit Win32::OLE

Thank you!!!
I can transmit 

    $reflection->TransmitANSI("argenis");
    $reflection->TransmitTerminalKey("289");

I obtain a error in the line

my $constants = Win32::OLE::Const->Load($reflection);

#########
Can't locate object method "Load" via package "Win32::OLE::Const" (perhaps you f
orgot to load "Win32::OLE::Const"?) at cd.pl line 17.
#########

Thank you for you answers....



"Sage, Christian" <[EMAIL PROTECTED]> wrote:
>
> Argenis,
> 
> having no experience whatsoever with Reflection I can't really say, but I would 
>guess you would need to gather the constant value definitions from the COM server 
>into a hash first and use those afterwards. At least that's what I find I have to do 
>when controlling MS Excel through OLE. The statement would be something like this:
> 
> my $constants = Win32::OLE::Const->Load($reflection);
> $reflection->{TransmitTerminalKey}= $constants{rcIBMTabKey}; 
> 
> No idea whether that will solve your problem, but it may be worth a try.
> 
> Cheers,
> Christian Sage
> 
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Gesendet am: Donnerstag, 7. Juni 2001 20:39
> An: [EMAIL PROTECTED]
> Betreff: problems whit Win32::OLE
> 
> Hi my friends
> I have a problem calling a method in a Connectio whit reflection from IBM
> 
> here is the code
> 
> #!c:/perl/bin/perl.exe
> #use strict;
>     use Fcntl;
>     use SDBM_File;
>     use Win32::OLE qw(EVENTS);
>     use CGI qw(:standard) ;
> 
> 
>     my $Quit;
>     tie my %adb, 'SDBM_File', 'adb', O_RDWR|O_CREAT, 0744;
>     my $reflection = Win32::OLE->new('Reflection4.Application');
>     #Win32::OLE->WithEvents($ie, 'BrowserEvents', 'DWebBrowserEvents2');
>     $reflection->{Visible} = 1;
>     $reflection->{Caption} = "Operador WAP - 4TEL";
>     $reflection->{ConnectionType}="BEST-NETWORK";
>     $reflection->{ConnectionSettings}="Host 161.196.68.141";
>     $reflection->{ConnectionSettings}="DefaultNetwork TELNET";  
>     $reflection->{Connect};
>     $reflection->{OleServerName}="n4001";   
>     $reflection->{Transmit}="n4001";
> # in this statement is teh error
>     $reflection->{TransmitTerminalKey}= "rcIBMTabKey"; 
>     $reflection->{TransmitTerminalKey(846)};
> # ******************************
> print "Finished";
> --
> "Es imposible calcular cuantas buenas ideas 
> se abandonan todos los días 
> como resultado de relaciones difíciles de manejar."
> 
> - John P. Kotter - 
> 
> 
> 
> 
>   
> 
> 
> 
> 
> 
> 
> Saludos
> Argenis Pérez
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
> 
> __________________________________________________________________
> Get your own FREE, personal Netscape Webmail account today at 
>http://webmail.netscape.com/
--
"Es imposible calcular cuantas buenas ideas 
se abandonan todos los días 
como resultado de relaciones difíciles de manejar."

- John P. Kotter - 




  






Saludos
Argenis Pérez








 




__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at 
http://webmail.netscape.com/

Reply via email to