Hi,
On the window of someone else's application there is an input field (class Edit).
There is text in this field. I know the pointer of this field and want to get its contents
#DEFINE WM_GETTEXT 13
buf:=space(200)
SendMessage(hWn, WM_GETTEXT, 200, @buf)
As a result, I get an empty value. What am I wrong about ?
Windows 10, FWH 18.06
Contents of the input field
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Contents of the input field
Natter,
Do it this way:
MsgInfo( GetWindowText( hWnd ) )
Do it this way:
MsgInfo( GetWindowText( hWnd ) )
Re: Contents of the input field
Since I need to get the text from someone else's application, the Getwindowtext(hWn) function will return an empty value.
I solved this problem using clipboard
SendMessage(hWn, EM_SETSEL, 0, -1)
SendMessage(hWn, WM_COPY, 0, 0)
buf:=oClp:GetText()
I solved this problem using clipboard
SendMessage(hWn, EM_SETSEL, 0, -1)
SendMessage(hWn, WM_COPY, 0, 0)
buf:=oClp:GetText()