Running a project instead of a script

I created a project Project1.ssproj, which has unit1.psc, unit2.psc and unit2.sfm.

How can I run the project from delphi and have delphi wait until it is completed with its execution?
Using ide.runproject just shows for a ms the form, then continue the normal delphi program, ide.runscript shows the form, but still continuing executing the delphi code. What I want is to execute/run the project, and have delphi wait until its complete, just like a modal dialog. I cant find examples/help/hints/faq about that at all.

Remember that the scripter run the project, it waited until it finished, then it returned the control to Delphi. The thing is your script calls Form.Show. So it was executed, and then finished. The form is a Delphi form inside your application, there is not a different executable for scripter.

What I'm trying to say is that there is a difference between script execution and a form being displayed. The script has finished - it's just that your (delphi) form is still visible. So it's up to your application/script to control the lifetime of the forms. If you want Delphi to wait for your script is compile "just like a modal dialog", why don't you simply use Form.ShowModal from the script, instead of Form.Show?

Yes, got that, saw my mistake a while ago and could not edit my post here...


Is there any way to retrieve the value of a variable from a project, after ide.runproject return?
For example, I open a dialog via a script to have a user enter something. How do I get that text he entered in the edit control from delphi?

Usually you set a Delphi variable/property from script with the desired value.