不常用的AHK,丢了又可惜,做个笔记
;切换桌面
IniRead iniNum, switch-desktop.ini, Common, DesktopNum, 2
idx := 0
num := iniNum
#`::
if (num >= 2) {
Send {Blind}{Ctrl down}
if (idx >= num - 1) {
while (idx > 0) {
Send {Blind}{Left}
idx--
if (idx > 0)
Sleep 100
}
} else {
Send {Blind}{Right}
idx++
}
Send {Blind}{Ctrl up}
}
return
;。。。
#!`::
InputBox inputNum, Desktop number
num := inputNum
IniWrite % num, switch-desktop.ini, Common, DesktopNum
return
;切换桌面
~` & q::^#Left
~` & w::^#Right
~` & e::^#d
最大化最小化不常用了,基本鼠标手势或触屏手势解决
;最小化,毕竟esc就常用于退出微信等软件的最小化
+esc::
WinMinimize, A
return
;最大化/向下还原窗口
^esc::
WinGet,S,MinMax,A
if S=0
WinMaximize,A
else if S=1
WinRestore,A
else if S=-1
WinMaximize,A
return
;~` & w::