使用方法:
按住鼠标左键,再按右键1次则记录当前窗口id,给鼠标侧键XButton1隐藏或唤醒窗口1使用
按住鼠标左键,再按右键2次则记录当前窗口id,给鼠标侧键XButton2隐藏或唤醒窗口2使用
对桌面或者任务栏,按住鼠标左键,再按右键1次或2次。则清除隐藏唤醒功能,恢复原键
#if GetKeyState("LButton", "P")
RButton::
if (winc_presses > 0) {
winc_presses ++
Return
} winc_presses = 1
SetTimer KeyWinC18, -400
Return
KeyWinC18:
if (winc_presses = 1) {
MouseGetPos,,,WinID
WinGetClass, WinClass, ahk_id %WinID%
if (WinClass="Progman") || (WinClass="Shell_TrayWnd")
XButton1WinID:=""
else
XButton1WinID:=WinID
} else if (winc_presses = 2) {
MouseGetPos,,,WinID
WinGetClass, WinClass, ahk_id %WinID%
if (WinClass="Progman") || (WinClass="Shell_TrayWnd")
XButton2WinID:=""
else
XButton2WinID:=WinID
} winc_presses = 0
Return
#if
*$XButton1::
if (XButton1WinID="") {
Send {XButton1}
} else {
if WinActive("ahk_id "XButton1WinID) {
WinMinimize, ahk_id %XButton1WinID%
WinActivate, ahk_class Shell_TrayWnd
} else {
WinRestore, ahk_id %XButton1WinID%
WinActivate, ahk_id %XButton1WinID%
}
} Return
*$XButton2::
if (XButton2WinID="") {
Send {XButton2}
} else {
if WinActive("ahk_id "XButton2WinID) {
WinMinimize, ahk_id %XButton2WinID%
WinActivate, ahk_class Shell_TrayWnd
} else {
WinRestore, ahk_id %XButton2WinID%
WinActivate, ahk_id %XButton2WinID%
}
} Return
帅呆了!!还有这种思路!受教啦!
请问*$xbutton1,前面的*$是什么意思呀
好用。