Trivalik 0 Posted October 7, 2007 Hello, i need the hidden text of an application. The code is in autoit like: Opt("WinDetectHiddenText", 1) MsgBox(0,"",WinGetText("window title")); Or only the API Function call? Share this post Link to post Share on other sites
Richard Robertson 187 Posted October 7, 2007 (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 October 7, 2007 by Richard Robertson Share this post Link to post Share on other sites
Trivalik 0 Posted October 7, 2007 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. Share this post Link to post Share on other sites
jvanegmond 307 Posted October 8, 2007 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 } github.com/jvanegmond Share this post Link to post Share on other sites
Trivalik 0 Posted October 8, 2007 I have try it with the MainWindowHandle, but it comes only the title not the hidden text! What goes wrong? Share this post Link to post Share on other sites
Richard Robertson 187 Posted October 8, 2007 You need to make a call to each control on the window to get the text. I already said that. Share this post Link to post Share on other sites