从其他应用程序中获取选定的文本 [英] getting selected text from other application

查看:70
本文介绍了从其他应用程序中获取选定的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我正在制作一个程序,可以从键盘上勾击镜头,并使用所选文本打开google搜索...现在,问题是我不知道如何获取此所选文本,因为用户可能是从任何其他程序中选择此文本...任何人都可以帮我吗?
非常感谢!!!!

好吧,我想我很清楚.我想制作一个程序,该程序将在我的PC上运行,该程序将检测我何时按crtl + alt + b并打开google页面(http://www.google.com/search?q=word)
并且此单词"将成为所选文本.来自示例:
使用MSN.我可以从邮件中选择一个单词,然后使用快捷键(ctrl + alt + b)在google上搜索该单词.

Marcus

Hello, i am making a program to hook a shotcut from the keyboard and open a google search with the selected text... now, the problem is that i dont know how to get this selected text, cuz the user could be selecting this text from any other program... can anyone help me??
thanks a lot!!!

Well, i think i wanst clear enough. I wanna make a program, that will be running in my pc, this program will detect when i press crtl+alt+b and will open the google page(http://www.google.com/search?q=word)
and this "word" will be the selected text. from example:
using the msn. I could select a word from my message and use the shortcut(ctrl+alt+b) to search this word on google.

Marcus

推荐答案

您无法控制其他应用程序的快捷方式或右键菜单上下文.您可以通过IE右键单击所选文本.

除非由其他应用程序指定,否则它们不会为您提供任何使用快捷方式的处理程序.
You cannot control other applications shortcut or right menu context. You can hook on to IE right click on selected text though.

Other applications won''t give you any handler to use a shortcut unless specified by them.


这篇关于从其他应用程序中获取选定的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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