MouseClick and MouseMove do not move to the correct coordinates if you are on a monitor that is not the main monitor.
Just to confirm I wasn't loading bad numbers, I made this short script
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, Mouse, Screen ; Regardless of being used or not, still doesn't work correctly, using this or not, it will work on the laptop screen but not the other two connected monitors
global x := 0
global y := 0
^+4::
MouseGetPos, x, y
;ToolTip Coords are %x% and %y%
return
^+5::
MouseMove, x, y, 5
return
I've confirmed that the position it's recording is also correct and makes sense.
This script works just fine on the main monitor. However, the moment you try to save a coordinate on another monitor and move to it, it's anyones guess on where it's going. I almost feel like it's adding an extra monitors worth of horizontal distance.
I'm using a laptop hooked up by USB C to a dock that uses two HMDI's to two monitors. It looks like
Monitor Monitor
Laptop
Please send help, thanks in advance,
Bloo