Thinkai's Blog

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

通过控件句柄获取控件ClassNN Autohotkey 9027

作者为 发表

Autohotkey

ControlGet, controlhwnd, hwnd, , , A ;获取控件hwnd
WinGet, mainhwnd, ID, A ;获取窗口hwnd
/*
VarSetCapacity(c,201,0)
DllCall("GetClassNameA","int",controlhwnd, "Ptr", &c, "Int", 200)  ;获取控件类
classname := StrGet(&c,200)
*/
WinGetClass, classname, ahk_id %controlhwnd%
nhwnd := 0, idx := 0
while nhwnd<>controlhwnd
{
idx++,nhwnd := DllCall("FindWindowExA","uint", mainhwnd, "uint", nhwnd, "Str", classname,"uint", 0) ;枚举该类控件,检查是否是这一个控件
if !nhwnd
break
}
classNN := classname idx



来了就留个评论吧! 没有评论




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

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

60 queries in 4.507 seconds |