Cos I got the right window but nothing is copied to the Clipboard altho text is highlighted! Here is a little snippet from the method:
But it doesn't? Any ideas why as the correct windows get highlighted?
Your knowledge and experience will be greatly appreciated, cheers.
Code:
internal void getHighlightedText() { // why can it not copy? string fff = Clipboard.GetText(); AttachThreadInput(_activeThreadId, _myProcessId, true); SetForegroundWindow(_hWnd); SendKeys.Send("^(C)"); fff = Clipboard.GetText(); AttachThreadInput(_activeThreadId, _myProcessId, false); //release the attachment if (Clipboard.ContainsText()) {
Your knowledge and experience will be greatly appreciated, cheers.
Comment