[feature] alt+tab 切换窗口后将鼠标移动至窗口中心
This commit is contained in:
parent
b0e1a73432
commit
de1a130495
12
win/win.ahk
12
win/win.ahk
|
@ -138,7 +138,15 @@ MoveCursorWin(toRight) {
|
||||||
~#7 Up::
|
~#7 Up::
|
||||||
~#8 Up::
|
~#8 Up::
|
||||||
~#9 Up::
|
~#9 Up::
|
||||||
Sleep 0.5
|
Sleep 100
|
||||||
WinGetPos, x, y, w, h, A
|
WinGetPos, x, y, w, h, A
|
||||||
DllCall("SetCursorPos", "int", x + w / 2, "int", y + h / 2)
|
DllCall("SetCursorPos", "int", x + w / 2, "int", y + h / 2)
|
||||||
return
|
return
|
||||||
|
~!Tab Up::
|
||||||
|
while (GetKeyState("Alt") != 0 or GetKeyState("Tab") != 0) {
|
||||||
|
Sleep 50
|
||||||
|
}
|
||||||
|
Sleep 100
|
||||||
|
WinGetPos, x, y, w, h, A
|
||||||
|
DllCall("SetCursorPos", "int", x + w / 2, "int", y + h / 2)
|
||||||
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user