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

surprising MouseMove behavior

Expand Messages
  • Philip Nemec
    It seems that SendMouseMove is multiplying everything by 3 (with Perl 5.8.0 and Windows XP). #!/usr/bin/perl use Win32::GuiTest qw(:ALL); SendMouseMoveAbs(0,
    Message 1 of 4 , May 20, 2003
    • 0 Attachment
      It seems that SendMouseMove is multiplying everything by 3 (with Perl
      5.8.0 and Windows XP).

      #!/usr/bin/perl
      use Win32::GuiTest qw(:ALL);

      SendMouseMoveAbs(0, 0);
      SendMouseMoveRel(1, 1);
      my ($x_div, $y_div) = GetCursorPos();
      print "div $x_div, $y_div\n";

      I get: div 3 3

      Any suggestions on what I'm doing wrong, or is this a bug?
    • Dennis K. Paulsen
      Hi, I don t recall ever using SendMouseMoveRel, but I do believe the x/y parameters supplied to it are supposed to be in what are known as mickeys , not pixel
      Message 2 of 4 , May 31, 2003
      • 0 Attachment
        Hi,

        I don't recall ever using SendMouseMoveRel, but I do believe the x/y
        parameters supplied to it are supposed to be in what are known
        as "mickeys", not pixel coordinates.. Note: A mickey is the amount
        that a mouse has to move for it to report that it has moved.

        If possible, you'll want to stick with MouseMoveAbsPix($x,$y) when
        moving the mouse...

        If you have further interest on this topic, please consult MSDN
        documentation for the mouse_event function; which is being used by
        SendMouseMoveAbs indirectly.... Primarily of interest will be
        descriptions of the dx and dy parameters.

        Regards,
        Dennis K. Paulsen

        --- In perlguitest@yahoogroups.com, "Philip Nemec" <panemec@y...>
        wrote:
        > It seems that SendMouseMove is multiplying everything by 3 (with
        Perl
        > 5.8.0 and Windows XP).
        >
        > #!/usr/bin/perl
        > use Win32::GuiTest qw(:ALL);
        >
        > SendMouseMoveAbs(0, 0);
        > SendMouseMoveRel(1, 1);
        > my ($x_div, $y_div) = GetCursorPos();
        > print "div $x_div, $y_div\n";
        >
        > I get: div 3 3
        >
        > Any suggestions on what I'm doing wrong, or is this a bug?
      • ikatiar
        Have you tried using MouseMoveAbsPix(x,y) instead? ... Perl
        Message 3 of 4 , Dec 20, 2006
        • 0 Attachment
          Have you tried using MouseMoveAbsPix(x,y) instead?



          --- In perlguitest@yahoogroups.com, "Philip Nemec" <panemec@...>
          wrote:
          >
          > It seems that SendMouseMove is multiplying everything by 3 (with
          Perl
          > 5.8.0 and Windows XP).
          >
          > #!/usr/bin/perl
          > use Win32::GuiTest qw(:ALL);
          >
          > SendMouseMoveAbs(0, 0);
          > SendMouseMoveRel(1, 1);
          > my ($x_div, $y_div) = GetCursorPos();
          > print "div $x_div, $y_div\n";
          >
          > I get: div 3 3
          >
          > Any suggestions on what I'm doing wrong, or is this a bug?
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.