1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-23 07:48:50 -05:00

Simba: GetClipBoard/SetClipBoard Added.

This commit is contained in:
John P (Dgby714) 2010-10-10 16:54:50 -04:00
parent b09880a116
commit 7f23ae10b5
4 changed files with 15 additions and 2 deletions

View File

@ -68,6 +68,7 @@ uses
lclintf,
httpsend,
superobject,
Clipbrd,
SimbaUnit,updateform, mmisc, mmlpsthread; // for GetTickCount and others.//Writeln
{$ifdef Linux}

View File

@ -264,3 +264,13 @@ function ps_Random(Int: integer): integer; extdecl;
begin
result := Random(int);
end;
procedure ps_SetClipBoard(const Data: string); extdecl;
begin
Clipboard.AsText := Data;
end;
function ps_GetClipBoard: string; extdecl;
begin
Result := Clipboard.AsText;
end;

View File

@ -193,6 +193,8 @@ AddFunction(@ps_InputQuery,'function InputQuery(const ACaption, APrompt : String
AddFunction(@ps_ShowMessage,'procedure ShowMessage(msg : string);');
AddFunction(@ps_messageBox,'function MessageBox(Text, Caption: string; Flags: LongInt): Integer;');
AddFunction(@ps_MessageDlg,'function MessageDlg(const Caption, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons) : integer;');
AddFunction(@ps_SetClipBoard, 'procedure SetClipBoard(const Data: string);');
AddFunction(@ps_GetClipBoard, 'function GetClipBoard: string;');
{$ENDIF}
{string}

View File

@ -261,8 +261,8 @@ uses
tpa, //Tpa stuff
forms,//Forms
SynRegExpr,
lclintf // for GetTickCount and others.
;
lclintf, // for GetTickCount and others.
Clipbrd;
{$ifdef Linux}
{$define PS_SafeCall}
{$else}