127Re: "Getting characters from an screen and putting them in another one"
- Aug 9 6:51 AMHere is some sample code which should help. If it does not, maybe
you can tell us more specifics, like what type of controls you are
# Sample code:
use Win32::GuiTest qw/
# Obtain handle to Notepad window
my ($win) = FindWindowLike(0, "^Untitled - Notepad", "");
# Obtain handle to Edit child window
my ($edit) = FindWindowLike($win, "", "Edit");
# Place some text into the Edit window
WMSetText($edit, "Hello, this is sample text.");
# Get the text BACK from child window
my $text = WMGetText($edit);
# Output text recieved to console
print "Text received: $text\n";
--- In perlguitest@y..., "hellarleo" <hellarleo@y...> wrote:
> First, Thanks for your help.
> However, after use that functions in my code, the text that I get
> the window text caption, not the data text that I need get.
> What's wrong?
> Thanks Again.
> --- In perlguitest@y..., "ctrondlpaulsden" <ctrondlp@n...> wrote:
> > If it is something like an edit control, you should be able to
> > WMGetText to obtain the text and WMSetText to display it on
> > --- In perlguitest@y..., "hellarleo" <hellarleo@y...> wrote:
> > > Hi Members!
> > >
> > > I need to write an script which need to copy a little text at
> > > position of an Windows application screen and paste it to
> > one.
> > > Anyone knows how may a do it?
> > >
> > > Best Regards.
- << Previous post in topic