How to automate a few things in the IDE


I am trying to provide a wizard like interface to user and based on their inputs they I want to add a new Form, a set of controls to the added form and some code to various controls events.

Has anyone tried to achieve this feat?

Can someone guide me as to how I can automate or add above mentioned in the IDE of Scripter programmatically?



I'm not aware of anyone that made it, so I'm not sure how hard it is to accomplish. But you can try to manipulate the Form in the Active File, like adding buttons and memos to it, eg.:

NewProjectFile := Engine1.NewFormUnit(TScriptLanguage.slPascal);
NewProjectFile.Form // <- Use this and add controls to it

Thanks for the hint.

I will try.

Thank you,

I tried to automate adding of controls over weekend but could not get it to function.

Do you have a sample to get me started please?


Hi, I'd suggest you send me what you did and the errors you got through e-mail, that we can try to work from that. Unfortunately I don't have a working code snippet for that approach.