赞
踩
目录


AutomationElement window = AutomationElement.FromHandle(get.WindowHwnd);
AutomationElement QQMsgList = window.FindFirst(TreeScope.Descendants,
new PropertyCondition(AutomationElement.NameProperty, "消息"));
if (QQMsgList != null)
{
AutomationElementCollection ALLMsg = QQMsgList.FindAll(TreeScope.Descendants,
new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.ListItem));
foreach (AutomationElement item in ALLMsg)
{
rtxtInfo.AppendText(item.Current.Name + "\r\n");
}
}
- AutomationElement window = AutomationElement.FromHandle(get.WindowHwnd);
-
- AutomationElement QQMsgList = window.FindFirst(TreeScope.Descendants,
- new PropertyCondition(AutomationElement.NameProperty, "消息"));
- if (QQMsgList != null)
- {
- AutomationElementCollection ALLMsg = QQMsgList.FindAll(TreeScope.Descendants,
- new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.ListItem));
-
- foreach (AutomationElement item in ALLMsg)
- {
- rtxtInfo.AppendText(item.Current.Name + "\r\n");
- }
- }
获取的聊天信息不全,最近的多条聊天信息获取不到。
1、截图OCR识别
2、不断复制,从剪切板中读取
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。