mdog has asked for the wisdom of the Perl Monks concerning the following question:
Do any of you know how to get all the text (or more than the title) from a windows application?
I can issue the following code but it just gets me the title:
use Win32::GuiTest qw(FindWindowLike GetWindowText SetForegroundWindow SendKeys SendMouse MouseMoveAbsPix GetDesktopWindow); my $rhapsodyHandle = GetWindow("rhapsody"); my $windowText = GetWindowText($rhapsodyHandle); print $windowText . "\n"; sub GetWindow{ my($windowName) = @_; my @windows = FindWindowLike(0, "^$windowName", ""); my $matchingWindow; for (@windows) { if($_){ $matchingWindow = $_; } } return $matchingWindow; }
Many thanks,
mdog
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting the text from a Win32 Application
by FuBaR (Acolyte) on Apr 16, 2005 at 05:30 UTC |