Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a translation program, I want when F1 is pressed to get the text that is selected at that time anywhere in Windows for it to get translated in my form and show it. I asked long ago and there was no way, maybe now there is.

What I have tried:

In Linux in Python it's easy with using xsel to get the selected text anywhere in Linux.
Posted
Updated 23-Jun-21 9:23am
v2
Comments
Dave Kreskowiak 23-Jun-21 17:05pm    
Maybe now there is? Only if Windows was redesigned at a base level, and that hasn't happened since NT came out a LOOOONG time ago.

1 solution

 
Share this answer
 
Comments
john1990_1 23-Jun-21 15:45pm    
Thx a lot, this is not a straightforward way and makes use of clipboard which would be problematic for clipboard history programs and programs that speak text when clipboard is changed for example, why doesn't Windows make something like xsel that is in Linux there must be a reason do you know?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900