Loading ...
Sorry, an error occurred while loading the content.

Re: GetWindowText not working

Expand Messages
  • backrev
    Could it be as simple as your findwindow is wrong ? I cut and pasted your script, edited your one line to read @jabber_windows = FindWindowLike(0, VDB56 , );
    Message 1 of 2 , Feb 19 6:57 PM
    • 0 Attachment
      Could it be as simple as your findwindow is wrong ? I cut and
      pasted your script, edited your one line to read
      @jabber_windows = FindWindowLike(0,"VDB56","");

      It worked great.


      --- In perlguitest@y..., "oradba_us" <oradba_us@y...> wrote:
      > I have written a short perl script to try to capture the text
      portion
      > of a window. However, I get nothing back when I execute the perl
      > script. I know that the child window TPaintPanel is the one that
      has
      > the text in it but I get nothing back from my call.
      >
      > Any suggestions? Perhaps there is another module that will give me
      > the window text?
      >
      > Below is the code I am using:
      >
      > use Win32::GuiTest qw(FindWindowLike GetWindowText WMGetText
      > GetChildWindows GetChildDepth GetClassName);
      >
      > $Win32::GuiTest::debug = 0;
      > @jabber_windows = FindWindowLike(0,"","TfrmChat");
      > for $child1 (@jabber_windows) {
      > print WMGetText($child1)."\n";
      > @tpanel_windows = FindWindowLike($child1, "", "TPanel");
      > for $child2 (@tpanel_windows) {
      > print "+".WMGetText($child2)."\n";
      > @html_windows = FindWindowLike($child2, "", "THTMLViewer");
      > for $child3 (@html_windows) {
      > print "++".WMGetText($child3)."\n";
      > @paint_windows = FindWindowLike($child3, "", "TPaintPanel");
      > for $child4 (@paint_windows) {
      > print "+++".WMGetText($child4)."\n";
      > print "+++".GetWindowText($child4)."\n";
      > }
      > }
      > }
      > }
      >
      > Thanks,
      > Mike Campbell
    Your message has been successfully submitted and would be delivered to recipients shortly.