Jump to content

Recommended Posts

Posted (edited)

The code is a little complicated. It requires enumerating through every window on the current desktop to find the one with "window title" and then you have to enumerate all the child windows (controls) of that window to collect all the text.

Edit: Capitalization error.

Edited by Richard Robertson
Posted

The code is a little complicated. It requires enumerating through every window on the current desktop to find the one with "window title" and then you have to enumerate all the child windows (controls) of that window to collect all the text.

Edit: Capitalization error.

The Window Title or Handle i have. I need only the part of getting the hidden text.

Posted

I only recently started digging through the AutoIt source code, but I found this part here that might help you:

Ofcourse, this is a piece of Jonathan's code and you will have to ask his permission first if you're going to use it.

if (SendMessage(hWnd, WM_GETTEXTLENGTH, 0, 0) > 0)
{
    // if (SendMessage(hWnd,(UINT)WM_GETTEXT,(WPARAM)AUT_WINTEXTBUFFER,(LPARAM)szBuffer))
    // GetWindowText(hWnd, szBuffer, AUT_WINTEXTBUFFER);
    SendMessage(hWnd, WM_GETTEXT,(WPARAM)AUT_WINTEXTBUFFER,(LPARAM)szBuffer);
    szBuffer[UTIL_WINTEXTBUFFERSIZE] = '';      // Ensure terminated if large amount of return text
}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...