Questions tagged [iactivescript]
15 questions
23
votes
3 answers
What is the ProgId or CLSID for IE9's Javascript engine (code-named "Chakra")
Using .NET, I can write an app that hosts a scripting engine that complies with Microsoft's IActiveScript conventions. This includes JScript and VBScript from Microsoft, and also PerlScript, RubyScript and I don't know what else from third-parties.…

Cheeso
- 189,189
- 101
- 473
- 713
6
votes
3 answers
Instance of IActiveScript, that implements the IE9's JavaScript engine (“Chakra”), works in a Quirks mode
By creating an instance of IActiveScript on the basis of CLSID "{16d51579-a30b-4c8b-a276-0ff4dc41e755}" (as described here), we get IE9's JavaScript engine, which works in a Quirks mode. Unfortunately, in the Quirks mode is not supported ECMAScript…

Andrey Taritsyn
- 1,286
- 11
- 26
3
votes
0 answers
Get IActiveScript of current page in IE
I have an IE plugin (BHO) and I want to access script engine.
I want to start profiling it, so IActiveScript interface pointer is probably needed.
I have IWebBrowser2 pointer, from that I tried getting IHTMLDocument (get_Document) and querying…

Caldur
- 135
- 10
2
votes
1 answer
Delphi pass string parameter to IDispatch.Invoke
Using Delphi 11.1, I want to add scripting to my application using IActiveScript. I created a small VBScript to test parameter passing from Delphi to the Script:
function test2(n)
MsgBox n
test2 = n
end function
VBScript code loads OK,…

Ronald Ruijs
- 67
- 1
- 11
2
votes
1 answer
Executing cscript using IActiveScript with C++
I'm trying to execute a script using cscript with IActiveScriptParse and ParseScriptText but for some reason I get an error: E_UNEXPECTED.
This article has helped me a lot. I'm using its getEngineGuid function in my code.
The code below is what I've…

Ella Sharakanski
- 2,683
- 3
- 27
- 47
2
votes
1 answer
IActiveScript profiling - view script source
I am playing with IE's JavaScript Chakra engine.
I have downloaded example code from MSDN and I am trying to figure out how to get the function source when I have just function IDand script ID.
I start profiling my js script and from profiler…

Caldur
- 135
- 10
1
vote
0 answers
How to run Python or C# as alternative to VBScript as automation engine
For many years we have been developing an application with Visual C++ and MFC.
The application itself has no technical flow logic, but functions as a com-server. After initialisation, the programme starts the Windows VBScript engine, which in turn…

suriel
- 191
- 1
- 10
1
vote
1 answer
Delphi pass multiple params to IActiveScript IDispatch.Invoke
Using Delphi 11.1, I want to add scripting to my application using IActiveScript. I created a small VBScript to test passing multiple parameters from Delphi to the Script:
Function TestParams(a, b, c)
TestParams = c
End Function
VB script load…

Ronald Ruijs
- 67
- 1
- 11
1
vote
0 answers
Fetch Local Variables value in VBScript implented using clearscript
I am implementing a debugger for Vbscript using Clearscript which is expected to display all the variables and their values upon hitting break point.
I am able to fetch all the variables using following code:
public static VBScriptEngine…

Jaskaran
- 320
- 5
- 19
1
vote
1 answer
Error adding SCRIPTITEM_CODEONLY symbol using IE9 JS engine (Chakra)
We've been using active scripting in our browser extension (BHO) for a while with the old JScript engine (CLSID_JScript), and we recently decided to support the new IE9 script engine (Chakra) as well. One thing we do is add symbols to the engine…

Matthew Gertner
- 4,487
- 2
- 32
- 54
0
votes
1 answer
How to implement event dispatching from a Windows Script host to a script
I have a C++ COM (multi-threaded apartment model) application that I build with Visual C++ 2019. I am playing with the COM-based Active Script interfaces and classes. I have a JavaScript ("JScript" really, CLSID…

Armen Michaeli
- 8,625
- 8
- 58
- 95
0
votes
1 answer
How to get a value from a VBScript to my C++ host?
I'm trying to execute a VBScript from a C++ ATL console application (non a VBS file, but simply a script embedded in my code) and get back a string from it.
I tried something like this:
HRESULT hr = S_OK;
CComVariant result;
EXCEPINFO ei = {…

Massimo
- 90
- 1
- 8
0
votes
0 answers
Silent exception when executing script with IActiveScript
I'm using a com object from jscript.dll
IActiveScriptSite is implemented, so when there is an error, OnScriptError is triggerd.
That works fine, but on some desktops, the error is not triggered, the script just stops executing when the error…

Arsnow
- 161
- 1
- 13
0
votes
1 answer
What to pass as the first parameter to IActiveScriptProfilerControl.StartProfiling?
Trying to use IActiveScriptProfilerControl::StartProfiling from my C# code, I've created this interface definition:
[ComImport]
[Guid(@"784b5ff0-69b0-47d1-a7dc-2518f4230e90")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
internal interface…

Uwe Keim
- 39,551
- 56
- 175
- 291
0
votes
1 answer
Making native COM methods work as first class citizens in jscript
My application is hosting jscript (IActiveScript, IE9). It exports an interface (dual, IDispatch) to it (see below). I can call it from jscript:
host.my_method(42);
but passing it to another function (or assigning to a variable) does not…

sms
- 1,014
- 10
- 20