Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Advice for embedded scripting.

Hi,

I would like to embed a scripting language in an application I am writing (which is C#).

My initial thoughts were to expose my managed objects as COM objects and use vbscript for the scripting language, but then I really like the look of Lua.

Apart from advice like "Why bother" :)  does anyone have any experience of having done this in C#?  If so I would appreciate some pointers to nice embeddable scripting languages ....

R
Monday, November 03, 2003

You might look into the IVsa interfaces, which will allow you to use VB.NET or JScript.NET as a script language in C#.

If you do want to go with an interop solution to the old Windows Script engines -- VBScript, JScript and all the third party engines -- then I recommend using the Microsoft Script Control.  I have never tried myself, but it should be pretty easy to build a Runtime Callable Wrapper around msscript.ocx.  That will be way, way, way easier than calling the IActiveScript interfaces via interop.

I might post a bit about this on my blog, or get Peter Torr to post about it on his blog.

Eric Lippert
Monday, November 03, 2003

This might be worth a look
http://www.alintex.com/

It is like a scripting host for .NET languages. It may help.
Also, .NET exposes the compiler, so you could allow your users to write scripts in C# or JScript and compile them on the fly.

Damian
Monday, November 03, 2003

Thanks guys.

Eric I'd love a decent blog entry on this, as I tend to read your blog quite often.

R
Tuesday, November 04, 2003


And eventually ......

I found this interesting, who wudda thunk it :)

http://weblogs.asp.net/rosherove/articles/DotNetScripting.aspx

R
Wednesday, February 18, 2004

*  Recent Topics

*  Fog Creek Home