Okay, I've got this working to a point. Now, on the screen where I want to read from a particular textbox, there are more than one textbox on the screen with the same Class name. How do I specify that I want to read from a certain textbox? I'm using the following code to read the text, but again, it's reading from the first textbox on the screen, I want to read from the second one.
VB Code:
If hwnd Then '-- grab text out of textbox hwnd2 = FindWindowEx(hwnd, 0, "Edit", vbNullString) If hwnd2 Then SetForegroundWindow hwnd ret = SendMessage(hwnd2, WM_GETTEXTLENGTH, 0, 0) buffer = Space(ret) ret = SendMessageByString(hwnd2, WM_GETTEXT, ret + 1, buffer) MsgBox buffer End If End If




Reply With Quote