The project's GUI contains a checkmark whether the user wants to clean.
[attachment=328:attachment]
The value of the checkbox is represented by the variable %pCheckBox1% which cannot be read from external scripts.
Solution: script.projects gets some code:
[ClearTarget] If,ExistDir,"%TargetDir%",Echo,"Deleting [%targetdir%]" If,ExistDir,"%TargetDir%",DirDelete,"%TargetDir%" If,ExistDir,"%TargetDir%",Exit,"%TargetDir% could not be deleted!" [Check-Clear] If,%pCheckBox1%,Equal,True,Run,%ScriptFile%,ClearTargetAnd in MakeDirs.Script there is just an
Exec,"%ProjectDir%\script.project",Check-Clear
Peter