I am automating an external program with the modules mentioned in the title of this query. I am using Win32::GUI in a non-owned windows format.

Everything is fine until I get to a point where I need to read some information from the other app's listview control. When I attempt to retrieve an item from the listview the source app crashes. A dialog comes up and proclaims that an error has occurred and that a log will be written. The alleged log is, however, an empty text file.

The offending code is : <more>

sub Select_Tapes ($@) { my $wh_DataCopier = shift; Win32::Sleep(700); my @handles = FindWindowLike ( $wh_DataCopier,"List1", undef ,unde +f); my $listview = $handles[0]; print "List view is at $listview \n"; print "There are :". Win32::GUI::ListView::Count($listview)."Tapes + listed in the Listview\n";
my %tape = Win32::GUI::ListView::GetItem($listview,0); # This line causes the program at handle #$wh_DataCopier to crash the perl script runs along just fine until it realizes there isn't a program to talk to anymore.
print "The First Item is $tape{'-text'}\n"; my @tapes = qw( 000001 000002 000003 000004 ); foreach $tape (@tapes) { my $tapeid=Win32::GUI::Combobox::FindString($listview,$tape); ($tapeid>0) ? print "Found a Tape $tape is index $tapeid\n": +print "Did not find tape $tape\n"; Win32::GUI::Combobox::Select($listview,$tapeid); }
UPDATE Win32::GUI ver .670 for perl 5.6

In reply to Automation Problem with Win32::GUI and Win32::GUITest by talwyn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.