As far as I can tell, no, that's the only real option. Example:
text.js
:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var ts = fso.OpenTextFile("foo.js");
var script = ts.ReadAll();
eval(script);
foo();
WScript.Echo(bar);
foo.js
:
var bar = "testing";
function foo() {
WScript.Echo("foo");
}
Output:
foo testing