Trivalik Posted October 7, 2007 Share 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? Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 7, 2007 Share 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 Link to comment Share on other sites More sharing options...
Trivalik Posted October 7, 2007 Author Share 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. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 8, 2007 Share 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 Link to comment Share on other sites More sharing options...
Trivalik Posted October 8, 2007 Author Share Posted October 8, 2007 I have try it with the MainWindowHandle, but it comes only the title not the hidden text! What goes wrong? Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 8, 2007 Share Posted October 8, 2007 You need to make a call to each control on the window to get the text. I already said that. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now