Finally was able to retrieve the window list from Perl
Win32 using some ugly code:<\p>
if ($^O eq "MSWin32")
{
my @pt = `tasklist /v`; # Get the process list from Windows (NT, 2
+K, XP, 7)
foreach my $p (@pt) # One process per line
{
if ($p =~ m/perl\.exe/ig) # Keep only the Perl processes
{
my @p2 = split(/\s+/, $p, 11); # Any space after 11 is par
+t of the window title
my $nm = $p2[10];
$nm =~ s/\s+$//g; # Remove trailing whitespace
...
}
}
}
else
{
# Use interps approach
}
Thanks again for the great inputs!
|