script:
**program first;
var i,z:Integer;
begin
z:=0;
for i:=1 to 4 do
begin
z:=z+i;
end;
end.**
delphi:
**this->PSScript1->Script->LoadFromFile("script.txt");
ShowMessage("OK0");
if(this->PSScript1->Compile())
{
ShowMessage("OK1");
this->PSScript1->Execute();
ShowMessage("OK2");
a= VGetInt( this->PSScript1->GetVariable("z") );
ShowMessage( System::Sysutils::IntToStr(a) );
}**