My laptop, running Windows 7 Pro, is connected to a docking station with 3 monitors.
The screens' disposition is something like that :
- Monitor 1 is 1366x768 (laptop)
- Monitor 2 is 1920x1280
- Monitor 3 is 1080x1920
- Monitor 4 is 1080x1920
The question is
How can I make my mouse go directly from monitor 1 to monitor 4 or 3, without going through monitor 2 ?
I have some solutions by using shortcuts or mouse buttons, but I would like a total transparent solution.
Some programs are near to what I am looking for, but doesn't handle this specific configuration :
Maybe an AHK script will help ? Any other hints ?
Thanks !
Regards,
Edit: replace schema with screen capture.
Answer
Thanks to @joseppinilla and this script, I wrote this little AHK script which resolves my problem :
#Persistent
CoordMode, Mouse, Screen
SetTimer, Cursor, 100
Return
Cursor:
MouseGetPos, XPos, YPos
If (YPos > 1200) {
; From 1 to 4
If (XPos <= 281) and (XPos > -1)
{
XPos = -4
}
; From 4 to 1
If (XPos >= -3) and (XPos < 279)
{
XPos = 282
}
; From 3 to 1
If (XPos <= 1922) and (XPos > 1644)
{
XPos = 1641
}
; From 1 to 3
If (XPos >= 1642) and (XPos < 1920)
{
XPos = 1923
}
MouseGetPos, nXPos, nYPos
;From 1 to 4
If (nXpos <= 280) and (nXPos >-1) or
; From 4 to 1
(nXPos >= -2) and (nXPos < 279) or
; From 3 to 1
(nXPos <= 1921) and (nXPos > 1644) or
; From 1 to 3
(nXPos >= 1643) and (nXPos < 1920)
{
MouseMove, %XPos%, %YPos%, 0
}
}
Return
Some details to understand this tiny script :
- 1200 is the Y position of the top of my Monitor 1
- -1 is the X Position of the Right of my Monitor 4
- 279 is the X position of the Left of my monitor 1
- 1644 is the X position of the right of my monitor 1
- 1920 is the X position of the left of my monitor 3
No comments:
Post a Comment