in reply to Re^3: Copy text from a window
in thread Copy text from a window
It runs OK, but there is nothing in the output. It seems that is so because of the window class "AEditCtl32" where I am trying to read. Does it make sense to continue in this direction, or should I try working with buffers?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^5: Copy text from a window
by wfsp (Abbot) on Mar 04, 2009 at 06:13 UTC | |
by Jon99 (Initiate) on Mar 04, 2009 at 12:22 UTC |