in reply to Re^2: Copy text from a window
in thread Copy text from a window

There is a discussion about working with child windows in the GUI testing - tutorial

Replies are listed 'Best First'.
Re^4: Copy text from a window
by Jon99 (Initiate) on Mar 03, 2009 at 23:14 UTC
    This tutorial was very helpful. This is the code I wrote:
    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;
    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?
      I can't help I'm afraid. Now that you have some code it may be worth posting a new question. Hopefully there are monks who have more experience with this aspect of Win32GuiTest than I have. Alternatively you could try posting to the mailing list mentioned in the docs.

      Good luck.

        Just to say thanks a lot. I solved my problem using Win32GuiTest tutorial (suggested by you).