I
ilavedelphi
Unregistered / Unconfirmed
GUEST, unregistred user!
FastScript 对象参数或变更参数怎么使用?
简单实例如:
procedure TForm1.Button1Click(Sender: TObject);
begin
fsScript1.Clear;
Memo1.Lines.Text:='begin
';
// 如果调用窗体里的参数就出错怎么办?
// Memo1.Lines.Add(' ShowMessage(Button1.Name)');
Memo1.Lines.Add(' ShowMessage(''Run Script'')');
Memo1.Lines.Add('end.
');
fsScript1.Lines := Memo1.Lines;
fsScript1.Parent := fsGlobalUnit;
if fsScript1.Compile then
fsScript1.Execute else
ShowMessage(fsScript1.ErrorMsg);
end;
简单实例如:
procedure TForm1.Button1Click(Sender: TObject);
begin
fsScript1.Clear;
Memo1.Lines.Text:='begin
';
// 如果调用窗体里的参数就出错怎么办?
// Memo1.Lines.Add(' ShowMessage(Button1.Name)');
Memo1.Lines.Add(' ShowMessage(''Run Script'')');
Memo1.Lines.Add('end.
');
fsScript1.Lines := Memo1.Lines;
fsScript1.Parent := fsGlobalUnit;
if fsScript1.Compile then
fsScript1.Execute else
ShowMessage(fsScript1.ErrorMsg);
end;