I'm writing this code to select some lines of text from another application ( process ) but the problem is that i can't handel to this application and get the selected text the text selected perfectly but can't copy this text , is there any way to simulate Ctrl+C command in delphi ? THis is my code
SetCursorPos(300, 300);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
SetCursorPos(300, 350);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
if not AttachThreadInput(GetCurrentThreadId,
GetWindowThreadProcessId(GetForegroundWindow), true) then
RaiseLastOSError;
try
SendMessage(GetFocus, WM_GETTEXT, 0, 0);
lookup_word := clipboard.astext;
CurvyEdit1.Text := lookup_word;
finally
AttachThreadInput(GetCurrentThreadId,
GetWindowThreadProcessId(GetForegroundWindow), false);
end;