Jump to content

MouseMove and relative to client area option


 Share

Recommended Posts

Hello

I have a problem with mousemove. I am using the option mousecoordmode relative to client area. The first time when i move the mouse with mousemove everything is ok. The second time the y coordinates are shifted by -26 (which is equivalent to the height of the titlebar of my window). Anyone has a clue how i can fix this (i want to have it to work with any titlebar height)?

Thanks for any help

Whisp

Link to comment
Share on other sites

Hello

I have a problem with mousemove. I am using the option mousecoordmode relative to client area. The first time when i move the mouse with mousemove everything is ok. The second time the y coordinates are shifted by -26 (which is equivalent to the height of the titlebar of my window). Anyone has a clue how i can fix this (i want to have it to work with any titlebar height)?

Thanks for any help

Whisp

Can you post some code that demonstrates what's happening? Does it depend on what program's windows you are dealing with?

:whistle:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Thank's for your reply. Here is some code:

....
Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)
....
for $i = 0 to 9
   $iconpos[$i][[0] = $_upperRightCorner[0] - 16 - $Offset - $i*32
   $iconpos[$i][1] = $_upperRightCorner[1] + 42
   MouseMove($iconpos[$i][0], $iconpos[$i][1])
next

$iconpos[$][1] is corresponding to the Y coordinates. As you see the y-coordinates don't change in the for-next-loop. But while the first MouseMove (when $i is 0) works fine, for all other moves the y coordinate is shifted by -26.

Link to comment
Share on other sites

Thank's for your reply. Here is some code:

....
Opt("MouseCoordMode", 2)
Opt("PixelCoordMode", 2)
....
for $i = 0 to 9
   $iconpos[$i][[0] = $_upperRightCorner[0] - 16 - $Offset - $i*32
   $iconpos[$i][1] = $_upperRightCorner[1] + 42
   MouseMove($iconpos[$i][0], $iconpos[$i][1])
next

$iconpos[$][1] is corresponding to the Y coordinates. As you see the y-coordinates don't change in the for-next-loop. But while the first MouseMove (when $i is 0) works fine, for all other moves the y coordinate is shifted by -26.

It could be that when the mouse moves the active "Client Area" of the window changes. :whistle:

Did you try it with both Options set to 0? That would make it realative to the active window, which would not change as the mouse moved.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...