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

341RE: [perlguitest] GetWindowRect problem

Expand Messages
  • ted
    Nov 7, 2003
      I have a similar situation. The way I solved it was to move the window
      to a known location on the screen. Be sure to account for different
      screen resolutions if, like me, you cannot use 0,0.


      -----Original Message-----
      From: miles_gould [mailto:miles_gould@...]
      Sent: Friday, November 07, 2003 6:59 AM
      To: perlguitest@yahoogroups.com
      Subject: [perlguitest] GetWindowRect problem

      I'm trying to test a program that was built with ILOG and so exports
      no useful subwindows to be found by FindWindowLike. Hence, all
      interaction has to be done with explicit key and mouse events. I'm
      trying to click on a button given a knowledge of its position within
      a window: you would have thought this would be a fairly simple matter

      my ($left, $top) = GetWindowRect($win);
      MoveMouseAbsPix($left + $xoffset, $top + $yoffset);

      except that GetWindowRect returns the top-left corner of the window
      as being (0,0), which it isn't. So I tried ClientToScreen, but that
      doesn't return any useful output (in fact, I've just printed the
      output of Dumper(ClientToScreen($win, $xcoord, $ycoord)) and it
      doesn't seem to return any output at all) and it leaves its arguments

      Any idea what I can do? I'm using Win32::GuiTest v1.3, and
      Activestate Perl build 806, version 5.8.0 running under Win 2K

      Thanks in advance,

      Yahoo! Groups Sponsor


      o=60178356&partid=4116719> click here


      To unsubscribe from this group, send an email to:

      Your use of Yahoo! Groups is subject to the Yahoo!
      <http://docs.yahoo.com/info/terms/> Terms of Service.

      [Non-text portions of this message have been removed]
    • Show all 4 messages in this topic