使用自定义按钮捕获Office Communicator对话窗口 [英] Capture Office Communicator Conversation Window using Custom Button

查看:76
本文介绍了使用自定义按钮捕获Office Communicator对话窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个自定义按钮,显示在Office Communicator对话窗口上(当你对某个窗口进行ping操作时打开是对话窗口。   A
Windows应用程序exe被触发点击按钮。我们现在需要在对话窗口中捕获聊天(历史记录) 在一个文本框中的操作。
We have a custom button which appears on the Office Communicator Conversation Window (When you ping someone the window which opens is the Conversation Window). A Windows Application exe is fired on click of the button. We now need to capture the Chat (history) in the Conversation Window in a TextBox of the exe.

推荐答案

我不确定如何将按钮放入对话窗口,但您必须使用OC自动化API来获取正确的窗口句柄并获取对话历史记录。 

I'm not sure how you are getting the button into the conversation window, but you have to use the OC automation API to get the correct window handle and get the conversation history. 

一种选择是让应用程序一直运行,它使用自动化API来获取OnIMWindowCreated事件并缓存窗口句柄。 然后,当您点击按钮时,您可以通过正在运行的应用程序传递您从
获得的句柄  GetForegroundWindow
  调用并将其与您获得的缓存句柄进行比较  。OnIMWindowCreated 如果匹配,则可以在应用程序中的缓存窗口句柄上调用History()方法并获取数据。

One option would be to have an application running all the time, that uses the automation API to get the OnIMWindowCreated events and caches the Window Handles.  Then when your button is clicked, you can pass the running app the handle you got from the  GetForegroundWindow    call and compare that to the cached handles you got from  OnIMWindowCreated.  If there is a match, then you can call the History() method on the cached window handle in your app and get the data.


这篇关于使用自定义按钮捕获Office Communicator对话窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆