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

205copying the text

Expand Messages
  • Rajeev J
    May 8, 2003
      Message
      I have a web page which has 2 huge text fields in that , what i am trying to do in perl is copy the content in these edit fields and paste it into a different file and then would do operation on the file.
       
      for doing the same(copying from the web page) i am using the script below which uses ^a and ^c to copy the content to the clipboard, but here what is happening is that it copies the content form both the edit fields , how do i copy the content of the first text field first and then pass the focus to the second text field and copy that
       
      Please let me what should be done extra , here or in case you have a different method to accomplish this
       
       
       
      =======================================================================================
      #! perl -w
      # vim: ts=4
       
      use strict;
      use Win32::GuiTest qw/
          PushButton
          FindWindowLike
          SetForegroundWindow
          SendKeys
          WaitWindow
          IsWindow
          WMGetText
         
          /;
        
         my @windows = WaitWindow("C2DTestP.htm");
        SetForegroundWindow($windows[0]);
      SendKeys("^a");
      SendKeys("^c");
      SendKeys("^v");
      my $text = WMGetText($windows[0]) ;
      print $text;
      ================================================================================
       
       
       
    • Show all 2 messages in this topic