本帖最后由 hucaiyu2009 于 2010-11-13 17:12:15 编辑

解决方案 »

  1.   

    先是注册TStringList类到fsScript对象中,
    delphi Code:
    procedure TForm1.Button1Click(Sender: TObject);
    begin
      fsScript1.Clear;
      fsScript1.Lines.Text := Memo1.Lines.Text;
      fsScript1.Parent := fsGlobalUnit;
      fsScript1.SyntaxType := 'PascalScript';
      if fsScript1.Compile then
        fsScript1.Execute
      else
        ShowMessage(fsScript1.ErrorMsg);
    end;
    FastScript Code:var
      s: TStringList;
      I: Integer;begin
      //ShowMessage('Hello FastScript');
      s := TStringList.Create;
      try
        s.Add('a');
        s.Add('b');    ShowMessage(s.Text);
      finally
        s.Free;
      end;end.