procedure SendText(ds:string);
var
TI: TInput;
KI: TKeybdInput;
i: integer;
begin
TI.Itype := INPUT_KEYBOARD;
for i := 1 to Length(ds) do
begin
KI.wVk := Ord(UpCase(ds[i]));
KI.dwFlags := 0;
TI.ki := KI;
SendInput(1, TI, SizeOf(TI));
KI.dwFlags := KEYEVENTF_KEYUP;
TI.ki := KI;
SendInput(1, TI, SizeOf(TI));
end;
end;
How can I add Unicode? Any suggestions how to copy Russian (Cyrilic) symbols using SendInput(Edit1.Text);
In this example I’ve used unit JclUnicode.pas from JEDI project. If you have Delphi 6 up then you can omit the JclUnicode in the uses clause.