Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/mr_zhuqiang/article/details/91490298
Dependent script: AutoHotkey installed directly on to
To look at the script contents as ahk file, then you can execute; single-screen can be adjusted following their own judgment xpos, ypos you want to adjust the value range
Left and right edges touch dual-screen version of the switch -Win10 switching virtual desktops script .ahk
;左右两个屏幕:1920x1020;左侧边缘为负数,右侧边缘为正数
;双屏显示器版本:左右双侧中间区域边缘部分可触发
;这个是设置鼠标坐标的相对位置,本例是相对雨整个桌面
CoordMode, Mouse ,Screen
#Persistent
;这个设置了获取鼠标信息的频率,数值越小边缘热区越灵敏
SetTimer, WatchCursor, 300
return
WatchCursor:
GetKeyState, state, LButton
MouseGetPos, xpos, ypos, id, control
;若要重设边缘热区的范围请,把下一行的 ; 号去掉,就会在鼠标位置显示鼠标的坐标,根据坐标修改以下数值
;ToolTip,x:%xpos% y:%ypos% state:%state%
if(state = "U" ){
if(ypos > 250 and ypos < 850){
if(xpos > 1918){
Send ^#{Right}
MouseMove, xpos -20, ypos
}else if(xpos = -1920){
Send ^#{Left}
MouseMove, xpos + 20, ypos
}
;显示所有虚拟桌面的热区
}else if(xpos = 0 and ypos = 0){
Send #{Tab}
MouseMove, 10, 10
}
}
return
;原文:https://blog.csdn.net/a__yes/article/details/77093183
The main screen version - the left edge touches the top and bottom edges -Win10 switching virtual desktops script .ahk
;双屏显示器版本:只在主屏幕左侧 50 ~ 200 上下边缘有效果,这样是为了误操作
;这个是设置鼠标坐标的相对位置,本例是相对雨整个桌面
CoordMode, Mouse ,Screen
#Persistent
;这个设置了获取鼠标信息的频率,数值越小边缘热区越灵敏
SetTimer, WatchCursor, 300
return
WatchCursor:
GetKeyState, state, LButton
MouseGetPos, xpos, ypos, id, control
;若要重设边缘热区的范围请,把下一行的 ; 号去掉,就会在鼠标位置显示鼠标的坐标,根据坐标修改以下数值
;ToolTip,x:%xpos% y:%ypos% state:%state%
if(state = "U" ){
;x方向的范围
if(xpos > 50 and xpos < 200){
;y方向的范围
if(ypos = 1079){
Send ^#{Right}
MouseMove, xpos, 1059
}else if(ypos = 0){
Send ^#{Left}
MouseMove, xpos, 20
}
;显示所有虚拟桌面的热区
}else if(xpos = 0 and ypos = 0){
Send #{Tab}
MouseMove, 10, 10
}
}
return
;原文:https://blog.csdn.net/a__yes/article/details/77093183