Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to get text from any window ?

kalskykalsky Member Posts: 1
Hi

i have a difficult one...
i'm trying to get the selected text from any window (not my form)
i tried WM_GETTEXT and all the others in the SendMessage group, but it works only on specific text boxs... (not working on microsoft office for example)

i also tried to use the MSAA (Microsoft Active Accessibility) to get the text, but this one also brings the text only from some windows..(also not working on microsoft office)

the only thing that is working for me is to use the clipboard (emulate CTRL+C at the active window), which works fine, unless you are working with the microsoft office (or any other multi-clipboard program) and then the user sees all the copying that i do...

i know it can be done, babylon dictionary takes the clicked text from any window, if anyone knows how they might do that please let me know..
if anyone knows how to do it without knowing how babylon does it, please let me know too :)

thanks in advance,
Yaniv

Comments

  • slickDevslickDev Member Posts: 9
    : Hi
    :
    : i have a difficult one...
    : i'm trying to get the selected text from any window (not my form)
    : i tried WM_GETTEXT and all the others in the SendMessage group, but it works only on specific text boxs... (not working on microsoft office for example)
    :
    : i also tried to use the MSAA (Microsoft Active Accessibility) to get the text, but this one also brings the text only from some windows..(also not working on microsoft office)
    :
    : the only thing that is working for me is to use the clipboard (emulate CTRL+C at the active window), which works fine, unless you are working with the microsoft office (or any other multi-clipboard program) and then the user sees all the copying that i do...
    :
    : i know it can be done, babylon dictionary takes the clicked text from any window, if anyone knows how they might do that please let me know..
    : if anyone knows how to do it without knowing how babylon does it, please let me know too :)
    :
    : thanks in advance,
    : Yaniv
    :
    :
    Hi
    You must use API functions.
    I am not sure what function you must use but you can find out.
    Go to 'http://www.mentalis.org/index2.shtml' and download the API-Guide
    software. It is free and it will help you very much.
    If i find something else I let you know.

Sign In or Register to comment.