110,534
社区成员
发帖
与我相关
我的任务
分享
foreach (var childChild1 in clientChilren)
{
if (childChild1.GetType().ToString().IndexOf("Object") > -1)
{
IAccessible childChild = (IAccessible)childChild1;
accRole = (int)childChild.get_accRole(CHILDID_SELF);
accName = childChild.get_accName(CHILDID_SELF);
childChild.accLocation(out nLeft, out nTop, out nWidth, out nHeight, CHILDID_SELF);
//IntPtr handler = IntPtr.Zero;
此API不对,获取所有所有元素句柄都一样,而SPY里真正获取到的句柄是不一样的
//WindowFromAccessibleObject(childChild,ref handler);
Console.WriteLine("1--- "+ handler + " , " + accRole + " , " + accName + "," + nLeft + "," + nTop + "," + nWidth + "," + nHeight);
}
else
{
Console.WriteLine(clientChilren);
}
}