This project has moved and is read-only. For the latest updates, please go here.

combine 2 Engine

May 18, 2014 at 6:21 PM
Can i combine vbscript and jscript?

to use vbscript written functions in jscript for example
May 19, 2014 at 2:37 PM
Hi furesoft,

A ClearScript script engine is just another host object, and you can expose any host object to any ClearScript script engine. For example, if you set up your VBScript engine like this:
var vbs = new VBScriptEngine();
vbs.AddHostType("Console", typeof(Console));
vbs.Execute("sub print(x):Console.WriteLine(x):end sub");
you can use it from JScript like this:
var js = new JScriptEngine();
js.Script.vbs = vbs;
In some cases, script items may be usable directly from another script engine:
but this is not recommended.

Good luck!