does anyone know how to copy the current selected text to a variable? (global)
i know how i could do that via clipboard but is there any way without using it?
I'm programming a youtube-downloader and for fetching the link i use a global hotkey (ctrl+y) which sends ctrl+c and then gets the link from the clipboard!
For example-> selecting firefox' address bar and pressing ctrl+y
But is it possible to get the link "directly" and not via clipboard?
I found SendMessage() with EM_GETSEL but i don't know how to find out the window handle of the address bar for example!
Thanks for your help guys, i solved it by another way which came from my informatics teacher.
His idea was to save the clipboard to an object and restore it after i don't need it anymore.
@modoran: thank you, spy++ helped me a lot when i was trying to use SendMessage and window handles, but the problem with this solution was that i didn't know how to find out if the application uses an edit control or a rich edit control!