主要功能是监控 GUI 窗口位置的移动,并动态在窗口右侧显示倒计时工具提示(ToolTip)。

 

Plain text
复制到剪贴板
Open code in new window
EnlighterJS 3 Syntax Highlighter
CoordMode, ToolTip
Gui, Add, Text,, Test
Gui Show, w154 h154
WM_MOVE(), OnMessage(0x0003, "WM_MOVE"), count := 7
Loop, %count% {
ToolTip, % count - A_Index + 1, x + width + 10, y
Sleep, 1000
}
Tooltip, 0
; https://www.autohotkey.com/boards/viewtopic.php?f=76&t=90465&p=399419
WM_MOVE(wParam := 0, lParam := 0) {
Global
WinGetPos, x, y, width,, ahk_class AutoHotkeyGUI
; ToolTip, 拖动Gui时触发
}
CoordMode, ToolTip Gui, Add, Text,, Test Gui Show, w154 h154 WM_MOVE(), OnMessage(0x0003, "WM_MOVE"), count := 7 Loop, %count% { ToolTip, % count - A_Index + 1, x + width + 10, y Sleep, 1000 } Tooltip, 0 ; https://www.autohotkey.com/boards/viewtopic.php?f=76&t=90465&p=399419 WM_MOVE(wParam := 0, lParam := 0) { Global WinGetPos, x, y, width,, ahk_class AutoHotkeyGUI ; ToolTip, 拖动Gui时触发 }
CoordMode, ToolTip
Gui, Add, Text,, Test
Gui Show, w154 h154
WM_MOVE(), OnMessage(0x0003, "WM_MOVE"), count := 7
Loop, %count% {
  ToolTip, % count - A_Index + 1, x + width + 10, y
  Sleep, 1000
}
Tooltip, 0

; https://www.autohotkey.com/boards/viewtopic.php?f=76&t=90465&p=399419
WM_MOVE(wParam := 0, lParam := 0) {
  Global
  WinGetPos, x, y, width,, ahk_class AutoHotkeyGUI
  ; ToolTip, 拖动Gui时触发
}

 

声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。