From 7f23ae10b5d940e44e43f7902eb39206d7dccd0e Mon Sep 17 00:00:00 2001 From: "John P (Dgby714)" Date: Sun, 10 Oct 2010 16:54:50 -0400 Subject: [PATCH] Simba: GetClipBoard/SetClipBoard Added. --- Projects/Simba/psextension.pas | 1 + Units/MMLAddon/PSInc/Wrappers/other.inc | 10 ++++++++++ Units/MMLAddon/PSInc/psexportedmethods.inc | 2 ++ Units/MMLAddon/mmlpsthread.pas | 4 ++-- 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Projects/Simba/psextension.pas b/Projects/Simba/psextension.pas index 9b69fda..5772088 100644 --- a/Projects/Simba/psextension.pas +++ b/Projects/Simba/psextension.pas @@ -68,6 +68,7 @@ uses lclintf, httpsend, superobject, + Clipbrd, SimbaUnit,updateform, mmisc, mmlpsthread; // for GetTickCount and others.//Writeln {$ifdef Linux} diff --git a/Units/MMLAddon/PSInc/Wrappers/other.inc b/Units/MMLAddon/PSInc/Wrappers/other.inc index fe54b75..8b93ab8 100644 --- a/Units/MMLAddon/PSInc/Wrappers/other.inc +++ b/Units/MMLAddon/PSInc/Wrappers/other.inc @@ -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; diff --git a/Units/MMLAddon/PSInc/psexportedmethods.inc b/Units/MMLAddon/PSInc/psexportedmethods.inc index 532d517..5456d5b 100644 --- a/Units/MMLAddon/PSInc/psexportedmethods.inc +++ b/Units/MMLAddon/PSInc/psexportedmethods.inc @@ -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} diff --git a/Units/MMLAddon/mmlpsthread.pas b/Units/MMLAddon/mmlpsthread.pas index 8b32a7c..55ad3a7 100644 --- a/Units/MMLAddon/mmlpsthread.pas +++ b/Units/MMLAddon/mmlpsthread.pas @@ -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}