copy selection of another application

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?

thanks,
n00biix
Can we start from the begining? What is it you're trying to do?
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!


Do you know what i mean?

BTW I'm using Borland C++ and Windows 7 x64!
Learn to use spy++ that came with visual studio or windows sdk.
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!
Topic archived. No new replies allowed.