Thinkai's Blog

Autohotkey|Python|php|aardio|VOIP|IT 爱好者

鼠标下的窗口和控件信息 Autohotkey 5694

作者为 发表

Autohotkey

说明:非标准控件应该抓不到,适配标准控件。按F12开启关闭监控,可以自己改热键。

F12::
kg := !kg ;反转
if kg
	SetTimer, monitor, 100 ;100毫秒 0.1秒
else
{
	SetTimer, monitor, Off
	ToolTip
}
return

monitor:
MouseGetPos, Ox, Oy, Owin, Octr_class ;输出xy和窗口句柄 控件类
ControlGetText, Octr_text, %Octr_class%, ahk_id %Owin%
ControlGet, Octr_id, Hwnd, , %Octr_class%, ahk_id %Owin%
Octr_textshort := StrLen(Octr_text) < 20 ? Octr_text : SubStr(Octr_text,1,20) "..."
ToolTip, 坐标:%Ox%`,%Oy%`n窗口句柄:%Owin%`n控件文字:%Octr_textshort%`n控件类:%Octr_class%`n控件句柄:%Octr_id%
return



来了就留个评论吧! 1个评论




友情链接:Autohotkey中文帮助Autohotkey官网Autohotkey中文网联系作者免GooglePlay APK下载

 主题设计 • skyfrit.com  Thinkai's Blog | 保留所有权利

62 queries in 1.849 seconds |