Processsing a script file from a c# program ?

  • Thread starter Thread starter peshrad
  • Start date Start date
P

peshrad

I'm using Windows 2000 and Visual Studio .NET.

I would like to program in some script language and process this script from
my C# desktop application.
How can this be done ?

In addition, if possible, I would like to define classes in my C# desktop
program and invoke methods of instances of these classes in the script.

Your kind help would be appreciated.
 
Hi,

You can employ Windows Scripting Host to run scripts and to expose your
application's object model to the script code. There's a Script Control
available to Windows Forms applications, but I am not sure it can be used
from console or Web ones. You might need to do a lot of COM Interop
yourself.
 
....
You can employ Windows Scripting Host to run scripts and to expose your
application's object model to the script code. There's a Script Control
available to Windows Forms applications, ... ....
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio

That sounds very good.
Thank you very much for your kind response.

Where can I find that Script Control ?
Does it belong to the Common Language Runtime of the .NET Framework ?
What's its name ?

Thank you very much in advance for your help.
 
I'm using Windows 2000 and Visual Studio .NET.

I would like to program in some script language and process this
script from my C# desktop application.
How can this be done ?

In addition, if possible, I would like to define classes in my
C# desktop program and invoke methods of instances of these
classes in the script.

The .Net framework provides the Microsoft.VSA namespace. That means
any .Net app can use the same scripting engine that Visual Studio
uses for VB.Net macros. Here are a couple of articles:

http://www.ftponline.com/wss/2003_06/magazine/features/rericsson/defa
ult.aspx

and

http://msdn.microsoft.com/library/?url=/library/en-
us/dnclinic/html/scripting06112001.asp


Hope this helps.

Chris.
 
Hi,
Where can I find that Script Control ?
Does it belong to the Common Language Runtime of the .NET Framework ?
What's its name ?

It's an ActiveX called Microsoft Script Control. It is not guaranteed that
it is present on your system (it is included into the VB6 distributive as
well as into the Windows 2000 Server distributive), but you can get it
online from the Microsoft website.

You should add it to your .NET project as a COM reference.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

peshrad said:
...
You can employ Windows Scripting Host to run scripts and to expose your
application's object model to the script code. There's a Script Control
available to Windows Forms applications, ... ...
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio

That sounds very good.
Thank you very much for your kind response.

Where can I find that Script Control ?
Does it belong to the Common Language Runtime of the .NET Framework ?
What's its name ?

Thank you very much in advance for your help.
 
The online link for the Microsoft Script Control is (mind the line wraps):

http://www.microsoft.com/downloads/...92-2595-49E6-8C02-1426FEC693AC&displaylang=en

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

peshrad said:
...
You can employ Windows Scripting Host to run scripts and to expose your
application's object model to the script code. There's a Script Control
available to Windows Forms applications, ... ...
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio

That sounds very good.
Thank you very much for your kind response.

Where can I find that Script Control ?
Does it belong to the Common Language Runtime of the .NET Framework ?
What's its name ?

Thank you very much in advance for your help.
 
Back
Top