[AHK]点击记事本的关闭按钮时最小化窗口

阅读 43

2023-04-24


http://forum.script-coding.com/viewtopic.php?id=12251

#IfWinActive ahk_class Notepad
LButton::
Click Down
IfWinNotActive ahk_class Notepad
{
   KeyWait LButton
   Click Up
}
return

LButton Up::
CoordMode, Mouse, Screen
MouseGetPos, x, y
SendMessage, 0x84,, (x & 0xFFFF) | (y & 0xFFFF) << 16  ; WM_NCHITTEST
if (ErrorLevel = 20) ; close button
   WinMinimize, A
Click Up
return
#IfWinActive




精彩评论(0)

0 0 举报