whisp Posted August 7, 2006 Posted August 7, 2006 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
PsaltyDS Posted August 7, 2006 Posted August 7, 2006 HelloI 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 helpWhispCan you post some code that demonstrates what's happening? Does it depend on what program's windows you are dealing with? 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
whisp Posted August 7, 2006 Author Posted August 7, 2006 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.
PsaltyDS Posted August 9, 2006 Posted August 9, 2006 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. 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now