Hello,
I recently updated Windows 10 to version 1903 and now I have trouble with a basic MouseMove left/right click script when using it on my 2nd monitor. Here is the script:
1::Rbutton
2::MouseMove 0, 112, 0, R
3::Lbutton
`::Suspend
Delete::
ExitApp
Return
When I use this script on my primary monitor, hitting [2] moves the mouse 112 downward, as expected. When I use the script on my 2nd monitor, it moves left and downward, and also increases in distance with each keystroke.
Here are two gifs for comparison.
First monitor: https gyazo.com /6713bd5bc3126c9d64d252293370c669 Broken Link for safety
Second Monitor: https gyazo.com /1f738153003e6d7be5d5be479c4af3b7 Broken Link for safety
Other relevant info for trouble shooting: Monitor 1 display settings are 150% scale, 1920x1080. Monitor 2 display settings are 100% scale, 1680x1050.
My goal is for the 2nd monitor to behave as the first one and drop the same distance every time. Thank you!
MouseMove script inconsistent on 2nd monitor Topic is solved
-
- Posts: 2
- Joined: 10 Aug 2019, 14:44
Re: MouseMove script inconsistent on 2nd monitor Topic is solved
Welcome to the forum!
I seem to remember that there were sometimes problems with multiple monitors (especially with differing setups). The MouseMove docs also say:(assuming that MouseGetPos returns the correct coords - which you might want to check, if this doesn't work)
I seem to remember that there were sometimes problems with multiple monitors (especially with differing setups). The MouseMove docs also say:
So, I would first try this:https://www.autohotkey.com/docs/commands/MouseMove.htm#Remarks wrote:The following is an alternate way to move the mouse cursor that may work better in certain multi-monitor configurations:
DllCall("SetCursorPos", "int", 100, "int", 400) ; The first number is the X-coordinate and the second is the Y (relative to the screen).
Code: Select all
2::
CoordMode, Mouse, Screen
MouseGetPos, X, Y
Y += 112
DllCall("SetCursorPos", "int", X, "int", Y)
return
-
- Posts: 2
- Joined: 10 Aug 2019, 14:44
Re: MouseMove script inconsistent on 2nd monitor
gregster wrote: ↑10 Aug 2019, 19:12Welcome to the forum!
I seem to remember that there were sometimes problems with multiple monitors (especially with differing setups). The MouseMove docs also say:So, I would first try this:https://www.autohotkey.com/docs/commands/MouseMove.htm#Remarks wrote:The following is an alternate way to move the mouse cursor that may work better in certain multi-monitor configurations:
DllCall("SetCursorPos", "int", 100, "int", 400) ; The first number is the X-coordinate and the second is the Y (relative to the screen).(assuming that MouseGetPos returns the correct coords - which you might want to check, if this doesn't work)Code: Select all
2:: CoordMode, Mouse, Screen MouseGetPos, X, Y Y += 112 DllCall("SetCursorPos", "int", X, "int", Y) return
Thank you! This script works on both monitors
Who is online
Users browsing this forum: peter_ahk, PuzzledGreatly, Rohwedder, Stinkfoot9 and 143 guests