Getting selected text globally
-
Hi, I have noticed that some programs can get the contents of a selection, and do something with it one a global hotkey is pressed. Some of them are spell checkers that will spellcheck the selected word in almost any application, some of them are telephony applications that will try to dial the selected text as a telephone number. Does anybody know how to do this? I have tried to get numerous samples, including the PC Magazine Robotype, but this program only knows which text that has been written. Any help would be greatly appreciated! Thank you for reading this far ;-) Christian Skovdal Andersen
-
Hi, I have noticed that some programs can get the contents of a selection, and do something with it one a global hotkey is pressed. Some of them are spell checkers that will spellcheck the selected word in almost any application, some of them are telephony applications that will try to dial the selected text as a telephone number. Does anybody know how to do this? I have tried to get numerous samples, including the PC Magazine Robotype, but this program only knows which text that has been written. Any help would be greatly appreciated! Thank you for reading this far ;-) Christian Skovdal Andersen
To get HWND, use GetForegroundWindow (not GetActiveWindow). Then, you can check if it's edit or richedit control, and if this is the case, grab the text with EM_GETSEL. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
-
To get HWND, use GetForegroundWindow (not GetActiveWindow). Then, you can check if it's edit or richedit control, and if this is the case, grab the text with EM_GETSEL. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
Glad to see your response. I have been looking for an answer to a similar question for a while! Can you tell me how to get to the selected text if the foreground window is not itself a edit control or richedit control but contains such controls? What about accessing a selected text in IE browser? Would appreciate very much your answers to these questions! Gene Yu - gene4yu@yahoo.com