procedure TForm1.Button1Click(Sender: TObject);
begin
PSScript1.Script.text := 'begin ShowMessage(''Hello Wold!!!!''); end.';
if PSScript1.Compile then
if PSScript1.Execute then
else
ShowMessage('Error Script:' + PSScript1.ExecErrorToString)
else
ShowMessage(PSScript1.CompilerErrorToStr(0));
end;
procedure TForm1.PSScript1Compile(Sender: TPSScript);
begin
procedure TForm1.Button1Click(Sender: TObject); begin PSScript1.Script.text := 'begin ShowMessage(''Hello Wold!!!!''); end.'; if PSScript1.Compile then if PSScript1.Execute then else ShowMessage('Error Script:' + PSScript1.ExecErrorToString) else ShowMessage(PSScript1.CompilerErrorToStr(0)); end;
procedure TForm1.PSScript1Compile(Sender: TPSScript); begin
Sender.AddFunction(@ShowMessage, 'procedure ShowMessage(msg: string))');