The MS Script Control is an ActiveX control by Microsoft that is used to provide general-purpose scripting services within an application. The MS Script Control supports both VBScript and JavaScript scripting languages.
Questions tagged [msscriptcontrol]
32 questions
4
votes
0 answers
Alternatives to MSScriptControl for executing JavaScript?
Since msscript.ocx MSScriptControl is 32 bit only, and Microsoft will be deprecating it, what is the alternative?
I am having an issue that MSScriptControl works perfectly so long as I run in a 32 bit application pool. But since it is a 32 bit…

7wp
- 12,505
- 20
- 77
- 103
3
votes
1 answer
How to Implement An Event in Microsoft Script Control?
All docs i've read on MSScriptControl say that it can respond to events of objects added to it.
the script control allows you to write script that will automatically
fire when an event on an object occurs.
…

johny why
- 2,047
- 7
- 27
- 52
3
votes
1 answer
Getting an error while selecting the language of MS Script Control 1.0 as Perl Script
In my VB 6 application, I am using Script Control 1.0 for running external scripts through my application. But while running, I am getting the below error.
"Error running Perl script: A script engine for the specified language can not be…

user2060457
- 33
- 3
2
votes
1 answer
Cannot catch custom exception thrown in MSScriptControl's Eval function
This is a MVCE of my problem.
I have this method using MSScriptControl to dynamically evaluate some formula.
public void DoCalculate()
{
try
{
var evaluator = new Evaluator();
IScriptControl ctrl = new ScriptControl();
…

duongntbk
- 620
- 4
- 25
2
votes
1 answer
CodeFluent vs Interop.MSScriptControl.dll
We had a 32 bits service that we are trying to migrate to 64 bits.
We were using Interop.MSScriptControl.dll to evaluate vb script written by users.
Since there is no 64 bits version of the MSScriptControl. I created a process that was called inside…

billybob
- 2,859
- 6
- 35
- 55
2
votes
1 answer
Implement immediate window for vbscript
I Have implemented a debugger using C#. It uses MSSCRIPT.ocx as a vbscript engine.
Can anyone tell me how i can implement immediate window feature in it.
Desired Feature:
Should Show all the available variables along with their values :
E.g.
i =…

Jaskaran
- 320
- 5
- 19
2
votes
3 answers
C# MSScriptControl Pass Class to Function
I am using MSScriptControl in C#. I would like to pass a class from the script to the host. Simplified example:
Javascript:
function Fx(n) {
this.name = n;
}
var fx = new Fx("test");
rfx.DoEffect(fx);
C#:
[ComVisible(true)]
public class Rfx {
…

001
- 13,291
- 5
- 35
- 66
2
votes
1 answer
Scriptcontrol - bind client & server properties
Is it possible to bind properties on the client and server side in Scriptcontrol, so when I set property in javascript, change will be visible also in code behind and when I set property in code behind, change will be visible in javascript?
I can't…

mrzepa
- 635
- 7
- 17
1
vote
1 answer
Error when try to use "ScriptControl" from "MSScriptControl" in VbsScript
I trying to run this code:
Dim jsonString, jsonDictionary
jsonString = "{ ""name"": ""John"", ""age"": 30, ""city"": ""New York"" }"
Set jsonDictionary = JSONToDictionary(jsonString)
MsgBox(jsonDictionary.Item("name")) ' ->…

Jaime Hernandez
- 11
- 2
1
vote
1 answer
C# run VBScript with MSScriptControl AddObject with string failed
This is my C# program:
class Program
{
static void Main(string[] args)
{
CallVbsFunction(1); //Work
CallVbsFunction(1.2); //Work
CallVbsFunction('a'); //Work
CallVbsFunction("a"); //!!Exception see bellow
…

themadmax
- 2,344
- 1
- 31
- 36
1
vote
0 answers
Eval in global scope under wscript
Is there a way to fully emulate a global eval() call from within a function call? I've tried various methods and cannot find a suitable solution that works under wscript:
var Global = this;
function globalEval(code) {
(1, eval).call(Global,…

SReject
- 3,774
- 1
- 25
- 41
1
vote
1 answer
How to create dynamic object members that are able to reference enclosed variables/functions?
How would I go about creating a dynamic object in such a way that it is wrapped in a closure and then, later on, be able to add members to the object that are able to reference the enclosed variables?
As this example shows, test.myFunct() can not…

SReject
- 3,774
- 1
- 25
- 41
1
vote
1 answer
Fetch all variable values in vbscript using msscript control
Is there any way to fetch all the variable values in the script at runtime.
Consider the following vbscript code.
var1= 5
Var2= 6
For i=0 To 5
Msgbox i
Next
How do i Implement it using msscript control that i should be able to retrieve all the…

Jaskaran
- 320
- 5
- 19
1
vote
0 answers
C# MSScriptControl Make Array Visible
I am using MS ScriptControl to add scripting to my application. Everything works fine except when I have a class that is visible to the script engine that has an array. I can't access the array elements from the script.
Example C# class:
using…

001
- 13,291
- 5
- 35
- 66
1
vote
0 answers
Python Script Engine not created in MSScriptControl
I am trying to use Python from Excel 2003 by means of MSScriptControl. I followed all the steps required, as indicated on various topics here and elsewhere, such as:
Installing ActivePython
Adding Reference "MSScriptControl 1.0" to VBA in…

mspadaccino
- 382
- 2
- 5
- 17