[Project_owners] Perl Wizard

Scott McWhirter scott at xede.org
Thu Sep 11 20:29:23 EDT 2003


On Thu, Sep 11, 2003 at 08:04:41AM +0200, Perry Smit wrote:
> 
> I don?t think process_instantiator.js will help men
> 
> A mean a script like this (out of perl) which I want run on moz.
> 
> use strict;
> use Win32::OLE;
> my @PhoneProperties = ("Business2TelephoneNumber","WebPage","BusinessFaxNumber","BusinessTelephoneNumber","CarTelephoneNumber","Home2TelephoneNumber","HomeTelephoneNumber","ISDNNumber","MobileTelephoneNumber","OtherFaxNumber","OtherTelephoneNumber","PrimaryTelephoneNumber",);
> my $outlook; $outlook = Win32::OLE->new('Outlook.Application');
> my $activeexplorer;$activeexplorer = $outlook->ActiveExplorer;
> 
> my $items = $activeexplorer->CurrentFolder->Items;
> #print $items->Count,"\n";
> my $linenumber = 1;
> 
> my $Kontakt;my $PhoneProp;my $ItemIndex = 1;
>     #while ($ItemIndex <= $items->Count) {
>     $Kontakt = $items->item(4);
>         foreach $PhoneProp (@PhoneProperties) {
>         my $KontaktItem = $Kontakt->{"$PhoneProp"};
>         print "$PhoneProp:$KontaktItem\n";
>        # };
>         $ItemIndex++;
>     };
> 
> Perry
*shudder*
Using a wizard to do perl scripts is very very nasty

by the way... you don't need to initiate a variable and then assign
it... you can do it in one step...
  my $outlook = Win32::OLE->new('Outlook.Application');
  my $activeexplorer = $outlook->ActiveExplorer();

etc. etc.

Perhaps you should have a look at plxpcom (yes i know it's old...
however i may look at resurrecting it).

-- 
-Scott McWhirter- | -kungfuftr-
XEDE Project Co-Ordinator


More information about the Project_owners mailing list