Page 1 of 1

Adding a scripting engine to C++Builder / Delphi apps

PostPosted: Mon Jan 09, 2012 12:18 am
by S0mbre
I've recently managed to implement custom scripting for a C++Builder project. Since writing a hand-made script parser/compiler is a nightmare, I was initially thinking of using a ready component, when I came across the Microsoft Scripting ActiveX Control (shipped with Windows via msscript.ocx). I used this one to create a C++Builder component which can then be added into any project to provide for VBScript or JScript scripting (in fact, the scripting control can be extended to other languages, but I haven't yet gone into that).

The most thrilling thing about the scripting engine is the fact that it can work with C++Builder classes / components as objects via the COM interface. The server application has to expose classes (methods, properties) via an automation (COM) object with a type library (it can be both an in-proc DLL and an out-proc EXE server). A reference to the registered object can then be added into the script control and used just like any object.

Please tell me if this sounds like an article. :)

Re: Adding a scripting engine to C++Builder / Delphi apps

PostPosted: Mon Jan 09, 2012 2:26 am
by Damon
Absolutely! Sounds like a very interesting and useful topic. Please send me an e-mail so that I can provide you with our latest article template and further instructions. (editor AT bcbj DOT org).

Many thanks!

Damon