Utilice UIAutomation para obtener información de chat de conversación QQ
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");
}
}
Actualmente tengo un problema, se obtiene información de chat incompleta y no se puede obtener mucha información de chat reciente.