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 ,undef);
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