1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-01-11 05:38:00 -05:00

Simba: Patch 1 (out of 2) for Paster extension.

This commit is contained in:
Merlijn Wajer 2010-09-26 12:54:37 +02:00
parent b17ae5c539
commit b980641a64
2 changed files with 7 additions and 0 deletions

View File

@ -181,6 +181,7 @@ begin
AddFunction(@ext_UnTarEx,'function UnTarEx(const Input : string;const outputdir : string; overwrite : boolean): boolean;');
AddFunction(@ext_MessageDlg,'function MessageDlg(const aCaption, aMsg: string; DlgType: TMsgDlgType;Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;');
AddFunction(@ext_InputQuery,'function InputQuery(const ACaption, APrompt : String; var Value : String) : Boolean;');
AddFunction(@ext_ScriptText,'function ScriptText: string;');
AddRegisteredPTRVariable('Settings','TMMLSettingsSandbox');
AddRegisteredVariable('Simba','TForm');
AddRegisteredVariable('Simba_MainMenu','TMainMenu');

View File

@ -122,3 +122,9 @@ function ext_InputQuery(const ACaption, APrompt : String; var Value : String) :
begin
result := InputQuery(acaption,aprompt,value);
end;
function ext_ScriptText: string;
begin
Result := SimbaForm.CurrScript.SynEdit.Lines.Text;
Result := ReplaceRegExpr('Players\[(.*?)\]\.([N|n][A|a][M|m][E|e]|[P|p][A|a][S|s]{2}|[P|p][I|i][N|n])\s*\:\=\s*\''.*?\'';', Result, 'Players[$1].$2 := ''*********'';', True);
end;