I have tried my first attempt in Perl to use COM API function instead of using the VB but I find it so hard
to do something simple in VB converted in Perl. I fail to simply find the way to query an object value. I am able to setup the link between the application that supports COM API using the following code but I cannot get any property value out.
#! perl -w
use strict;
use FileHandle;
use Win32::OLE;
my $Class = "ValorLepComApi.T5KAEFactory";
eval {$LEP = Win32::OLE->GetActiveObject($Class)};
die "LEP not installed" if $@;
In VB the following code works fine but I cannot get it converted to Perl
For each PLACEMENT in Recipe.Placements
MsgBox PLACEMENT.PlacementPart.Refdes
Next
The above simple code will get all the values out of the
object PLACEMENT.PlacementPart.Refdes but I am not able
to get this written in Perl. I looked all over the internet
but could not find any example. Only examples on how to
excecute things like in Excel but not query objects values.
Any good books on general Object orientated programming in Perl for dummies.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.