Solved

.NET script host

Posted on 2002-06-20
8
692 Views
Last Modified: 2013-11-25
is there a scripting host compatible with .NET?
The ActiveX object cannot AddObject a .net control.
And in VS.net there is no component for scripting.
why????
0
Comment
Question by:Azmodan
8 Comments
 
LVL 20

Expert Comment

by:Silvers5
ID: 7097040
ASP.NEt is now a compiled platform.. but you can past pure asp3.0 in your asp.net pages.. it's reverse compatible but not recommended and might not be supported in next releases.. so start developing under .NET using the "new" languages..
0
 

Author Comment

by:Azmodan
ID: 7097905
no no no
not in ASP or web development is that I need the scripting.
I used the scripting host in VB6 to let the users command some of the control on the interface. It had nothing to do with web development. There was an ocx (script host control - msscript.ocx) that allowed vb controls to be added to it with AddObject and that, by script, I could modify properties of the object/control.

Is there a scripting host that allows integration with .NET?
0
 
LVL 2

Expert Comment

by:tdubroff
ID: 7099281
You should be able to tlbimport the msscript.ocx.  This will give you a COM wrapper.  To run code you can do:

dim iscr as MSScriptControl.ScriptControl
iscr = new MSScriptControl.ScriptControlClass
iscr.Language = "vbscript"
iscr.ExecuteStatement("msgbox ""hello from vbscript""")

From a WinForm's perspective you should:

1) Right click on 'References' in the Solution Explorer
2) Click on Add Reference
3) Click on the COM tab
4) Double click on the 'Microsoft Script Control 1.0'
   This will import it into your project.
5) Click OK

Now you should be able to add .NET objects into the script engine by adding public functions.  Similar to the following:

iscr = new MSScriptControl.ScriptControlClass();
iscr.Language = "jscript";
iscr.AddObject( "obj", new TestThing( this ), true);
iscr.AddObject( "test", this, true );

Hope that helps.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:Azmodan
ID: 7131248
For .NET control it doesn't work
I need a scripting environment than can take .NET controls.

I found out about VSA. This is what i need, but it's very complicated to make an engine.
Has someone done or found, a script control made with vsa?
0
 

Author Comment

by:Azmodan
ID: 7131252
For a .NET control it doesn't work
I need a scripting environment than can take .NET controls.

I found out about VSA. This is what i need, but it's very complicated to make an engine.
Has someone done or found, a script control made with vsa?
0
 

Author Comment

by:Azmodan
ID: 7131253
For a .NET control it doesn't work
I need a scripting environment than can take .NET controls.

I found out about VSA. This is what i need, but it's very complicated to make an engine.
Has someone done or found, a script control made with vsa?
0
 
LVL 8

Expert Comment

by:zlatev
ID: 7965110
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- PAQ points not removed


Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Zlatin Zlatev
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 8018755
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question