paxStudio  
 
 
Screenshots DownloadTutorial
 
 
 
 
 

//Run a project from the command line

if ParamCount < 1 then exit;
if not FileExists(ParamStr(1)) then
begin
ShowMessage('Invalid file path.');
exit;
end;
if ParamCount > 1 then
begin
if ParamStr(2) = '/c' then //Must be compiled
Compile := true;
if ParamCount > 2 then
begin
if ParamStr(3) <> '' then //Compiled file name
CompiledName := ParamStr(3)
else
CompiledName := TruncExt(ParamStr(1)) + '.cpax';
end;
end;
AppName := ParamStr(1);
SetCurrentDir(ExtractFilePath(ExpandFileName(AppName)));
//Set current directory for project
try
if Compile then //Compile project if needed
begin
Project.Load(AppName);
Project.CompiledName := CompiledName;
Project.Compile;
Project.Close;
end
else
begin
if ANSILowerCase(ExtractFileExt(AppName)) = '.pax' then
begin
Project.Load(AppName); //Load project
Application.Title := Project.Title;
if Application.Title = '' then
Application.Title := ExtractFileName(AppName);
Project.Run //Run project
end
else
begin
Project.CompiledName := AppName;
Project.RunCompiled; //Run already compiled
end;
end;
finally
Project.Close;
Project.Free;
end;

//Compile a project

procedure TForm1.btnCompileClick(Sender: TObject);
begin
if not FileExists(edtProjectName.Text) then
begin
ShowMessage('Invalid project file name!');
exit;
end;
if ANSIUpperCase(ExtractFileExt(edtProjectName.Text)) = '.CPAX' then
begin
ShowMessage('This file already compiled!');
exit;
end;
try
if Assigned(Project) then
begin
Project.Stop;
Project.Close;
end;
Project := TpaxProject.Create(edtProjectName.Text);
Project.Scripter := Scripter;
Project.Load(edtProjectName.Text);
CompiledName := TruncExt(edtProjectName.Text) + '.cpax';
Project.CompiledName := CompiledName;
Project.Compile;
Project.Close;
ShowMessage('Compiled successfull!');
finally
end;
end;


 
Code examoles
Runing paxProjects from your application
  paxRuntime example
  paxTest example
  RunProject example
 
     

Дизайн сайта, создание сайта, интернет маркетинг - AlexFill