SRL Archive - OSR Help

Help With Copy/Paste


Death12652

2010-05-13 00:42:40

What is the best way for scar to copy/paste… The keydown(17 +67); and keydown(17 + 86); or what?

Sex

2010-05-13 01:08:24

Well on the Delphi form components there are functions for copying and pasting. And for copying text on another thing, just make sure it is selected somehow; and then try something like this:
KeyDown(VK_CONTROL);
KeyDown(GetKeyCode('c'));
KeyUp(GetKeyCode('c'));
KeyUp(VK_CONTROL);
Likewise for v.

Death12652

2010-05-13 01:14:43

Thanks.

i luffs yeww

2010-05-13 03:03:57


program CopyPasta;
var
F: TForm;
E: TEdit;

procedure InitForm;
begin
F:= CreateForm;
E:= TEdit.Create(F);
with E do
begin
Parent:= F;
PasteFromClipboard;
Writeln(Text);
end;
end;

procedure SafeInitForm;
var
V: TVariantArray;
begin
V:= [];
ThreadSafeCall('InitForm', V);
end;

begin
SafeInitForm;
end.

Just something that someone posted. Pastes what's in the clipboard. I find it nifty.