AutoHotkey是简易而功能强大的热键脚本语言。使用者可将键盘、鼠标甚至游戏摇杆的移动和点击动作记录下来。小凡今天为大家分享一下AutoHotkey获取窗体控件的方法教程。
方法1:用autohotkey自带的window spy,右击autohotkey的托盘图标-》window spy

但window spy对某些窗体的控件检测不到。

.通常获取不了的控件都是用颜色或图像来判断位置所在。(颜色也可以通过window spy查看)

方法2:自己编代码检测窗体控件。
#PersistentSetTimer, WatchActiveWindow, 200returnWatchActiveWindow:WinGet, ControlList, ControlList, AToolTip, %ControlList%return

该代码与window spy检测的是一样的。

ps:按钮、滚动条、输入框等就是控件。
