|
-
Jan 27th, 2002, 02:45 PM
#1
Thread Starter
Lively Member
Getting the text from a window
When I try to get the text from this application it won't work, this is the code im using
public sub blah
Dim x As Long, editx As Long
x = FindWindow("#32770", vbNullString)
editx = FindWindowEx(x, 0&, "edit", vbNullString)
Dim TheText As String, TL As Long
TL = SendMessageLong(editx, WM_GETTEXTLENGTH, 0&, 0&)
TheText = String(TL + 1, " ")
Call SendMessageByString(editx, WM_GETTEXT, TL + 1, TheText)
TheText = Left(TheText, TL)
end sub
I put the following in a timer to see if it is getting anything and its not
call blah
text1.text = TL
Why won't it work?
thanks
-
Jan 28th, 2002, 07:29 AM
#2
Check your thread in General Development.
-
Jan 28th, 2002, 09:50 AM
#3
You have to send your string buffer ByVal:
Code:
Call SendMessageByString(editx, WM_GETTEXT, TL + 1, ByVal TheText)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|