更改“发送至”在 Windows 上使用 Python
我需要重定向 Microsoft Office(主要是 Word 和 Excel)中的“发送到邮件收件人”菜单,以使用 Web 客户端电子邮件发送文档。我需要对右键单击文件时出现的上下文菜单执行相同的操作(即“发送至”->“邮件收件人”)。
我想使用 Python 捕获这些事件,可能通过 COM 或 ctypes 通过 PyWin32。有谁知道该怎么做这种事情?我使用的是 Windows XP 和 Python 2.6。谢谢!
I need to redirect the "Send To Mail Recipient" menu in Microsoft Office (primarily Word and Excel) to send the document using a web client email. I need to do the same thing with the context menu that appears when right-clicking a file (i.e. Send To -> Mail Recipient).
I'd like to catch these events using Python, probably via PyWin32 via COM or ctypes. Does anyone know how to do this sort of thing? I'm using Windows XP and Python 2.6. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我唯一能想到的就是使用 Python 的 Microsoft Active Accessibility 绑定。这些使您能够监视事件,包括窗口打开/关闭事件。我想不出任何其他库具有此功能。
http://www.cs .unc.edu/Research/assist/doc/pyaa/public/pyAA.AA.AccessibleObject-class.html
我不会骗你的。这不是一个很好的解决方案,但它可以工作。
这是另一个描述:
http://web.archive.org/web/20080510165211/mindtrove.info/articles/gui-automation-with-pyaa/" archive.org/web/20080510165211/mindtrove.info/articles/gui-automation-with-pyaa/
the only thing I can think of is to use Microsoft Active Accessibility bindings for Python. These give you the ability to monitor events, including window open/close events. I can't think of any other library that has this functionality.
http://www.cs.unc.edu/Research/assist/doc/pyaa/public/pyAA.AA.AccessibleObject-class.html
I won't kid you. This is not a pretty solution, but it can work.
here's another description:
http://web.archive.org/web/20080510165211/mindtrove.info/articles/gui-automation-with-pyaa/