Jon99 has asked for the wisdom of the Perl Monks concerning the following question:
I want to get the text from a child-window of an application (which limits the manual copy/paste). In WinSpy this window is identified as 'AEditCtl32'. The code shows no errors, but also no result - I can't read the content.use Win32::GuiTest qw( FindWindowLike WMGetText ); use strict; use warnings; my @whnds = FindWindowLike( undef, "^Fjalori elektronik shpjegues" + ); if( !@whnds ){ die "Cannot find window with title/caption Fjalori\n"; }else{ printf( "Window handle of calculator application is %x\n", $wh +nds[ 0 ] ); } my $edit_ctrl_id = 600; #Edit window, 258 Hex my @edit = FindWindowLike( $whnds[ 0 ], undef, "^AEditCtl32", $edi +t_ctrl_id ); if( !@edit ){ die "Cannot find window handle for Edit control\n"; }else{ printf( "Edit window handle is %x\n", $edit[ 0 ] ); } my $result = WMGetText( $edit[ 0 ] ); print $result;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Some Win32GUITest code,need assistance
by Anonymous Monk on Mar 04, 2009 at 12:16 UTC | |
|
Re: Some Win32GUITest code,need assistance
by BrowserUk (Patriarch) on Mar 04, 2009 at 13:01 UTC | |
by Jon99 (Initiate) on Mar 04, 2009 at 18:51 UTC |