Pues bien, gracias a su colaboración quedó así...
Código Delphi
[-]procedure TForm1.EnviarTexto(const sTexto: string);
var
SInfo: TStartupInfo;
PInfo: TProcessInformation;
Notepad: HWND;
NoteEdit: HWND;
ThreadInfo: TGUIThreadInfo;
begin
ZeroMemory(@SInfo, SizeOf(SInfo));
SInfo.cb := SizeOf(SInfo);
ZeroMemory(@PInfo, SizeOf(PInfo));
WaitForInputIdle(pInfo.hProcess, 5000);
Notepad := FindWindow('Notepad', nil);
if Bool(Notepad) then begin
NoteEdit := FindWindowEx(Notepad, 0, 'Edit', nil);
if Bool(NoteEdit) then begin
SendMessage(NoteEdit, WM_SETTEXT, 0, Longint(sTexto));
SendMessage(NoteEdit, EM_SETMODIFY, WPARAM(True), 0);
end;
end;
end;
La llamada...
Código Delphi
[-]
var
sTexto : string;
begin
sTexto := edtBoleta.Text + Chr(13) + edtCamion.Text + Chr(13) + edtCargadora.Text + Chr(13);
EnviarTexto(sTexto);
.
.
.
.
end;
Y el resultado (en Notepad, obviamente)...
5C64654654
Y9878
X6546