I have been reading and trying different suggestions for hours.
I need to grab and process the data that is displayed in a terminal emulator window. My clients use different emulators but all are text based.
I am assuming that i will be able to identify the window handle. I have does this in testing and have tried to issue a select all, copy and the deselect and then
get the data from clipboard. nothing shows in the clipboard.
for testing i am using an open and running copy of notepad.
caption = "notepad.exe"
hWnd = FindWindow(vbNullString, Caption)
ix = SendMessage(hWnd, EM_SETSEL, 0, -1) 'start selecting
ix = SendMessage(hWnd, WM_COPY, 0, 0)
ix = SendMessage(hWnd, EM_SETSEL, -1, 0) 'end selecting
sTemp = Clipboard.GetDataObject.GetData(DataFormats.Text)
the clipboard get does yield the last information in the clipboard, but not what i wanted to select out of note pad.
What am i missing?
Is there a better way?
thansk in advance.