473,804 Members | 3,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scripting

Hello, I am trying to figure out how to do some scripting.

Can I script in csharp?
Can I script in VBScript if my web page has been developed using csharp?

Can I iterate though a datatable object in my script file? How can I
reference the datatable object which was created in my code-behind form?

Thanks in advance for your assistance!!
Nov 19 '05 #1
4 1530
Scripting, by definition, is not compiled. .Net, by definition, IS compiled.
Therefore, you cannot do scripting with ANY .Net language.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"Jim Heavey" <Ji*******@disc ussions.microso ft.com> wrote in message
news:B9******** *************** ***********@mic rosoft.com...
Hello, I am trying to figure out how to do some scripting.

Can I script in csharp?
Can I script in VBScript if my web page has been developed using csharp?

Can I iterate though a datatable object in my script file? How can I
reference the datatable object which was created in my code-behind form?

Thanks in advance for your assistance!!

Nov 19 '05 #2
actually jscript.net has a complete scripting engine. code executed thru the
eval() is actully run thru an interpreter, rather than compiling/jiting code
into the app domain (the standard approach in writing c# scripts).

-- bruce (sqlwork.com)

"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
| Scripting, by definition, is not compiled. .Net, by definition, IS
compiled.
| Therefore, you cannot do scripting with ANY .Net language.
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Jim Heavey" <Ji*******@disc ussions.microso ft.com> wrote in message
| news:B9******** *************** ***********@mic rosoft.com...
| > Hello, I am trying to figure out how to do some scripting.
| >
| > Can I script in csharp?
| > Can I script in VBScript if my web page has been developed using csharp?
| >
| > Can I iterate though a datatable object in my script file? How can I
| > reference the datatable object which was created in my code-behind form?
| >
| > Thanks in advance for your assistance!!
|
|
Nov 19 '05 #3
Hi.

I implemented VB Script by using the MSScriptControl ActiveX component. Add
this as an ActiveX component reference.

You can add objects to the script control that will be accessible as global
variables in your script. The .NET Framework will automatically generate a
wrapper around you component that will allow the script to communicate with
it.
You can then add code. Call a function and get the return value.
There is however a problem with calling functions in the script that has
byref-arguments. You can get the value in, but not out. There is a solution
but it is pretty hard-core (it involves modyfing the automaticcaly generated
wrapper for the ActiveX component).

Please note, that it is possible to create scripts in VB.NET using the
Microsoft.Vsa namespace, but it is IMHO way too complex.

IScriptControl scriptControl;
scriptControl = new ScriptControlCl ass();
try
{
scriptControl.L anguage = "VBScript"; // could also be JScript.
// Add an object that is accessible from the script.
scriptControl.A ddObject("SomeO bject", someObject , false);
// Add some code to the script.
scriptControl.A ddCode( code );
// Execute a function
object returnValue = scriptControl.R un(functionName , arguments );
}
finally
{
// This is a COM Object so we should release it manually.
System.Runtime. InteropServices .Marshal.Releas eComObject(
scriptControl );
}

"Jim Heavey" <Ji*******@disc ussions.microso ft.com> wrote in message
news:B9******** *************** ***********@mic rosoft.com...
Hello, I am trying to figure out how to do some scripting.

Can I script in csharp?
Can I script in VBScript if my web page has been developed using csharp?

Can I iterate though a datatable object in my script file? How can I
reference the datatable object which was created in my code-behind form?

Thanks in advance for your assistance!!

Nov 19 '05 #4
Well, that is news to me, and interesting. I'll pack that bit of info away.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.

"bruce barker" <no***********@ safeco.com> wrote in message
news:uX******** ******@TK2MSFTN GP09.phx.gbl...
actually jscript.net has a complete scripting engine. code executed thru the eval() is actully run thru an interpreter, rather than compiling/jiting code into the app domain (the standard approach in writing c# scripts).

-- bruce (sqlwork.com)

"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
| Scripting, by definition, is not compiled. .Net, by definition, IS
compiled.
| Therefore, you cannot do scripting with ANY .Net language.
|
| --
| HTH,
| Kevin Spencer
| .Net Developer
| Microsoft MVP
| Neither a follower
| nor a lender be.
|
| "Jim Heavey" <Ji*******@disc ussions.microso ft.com> wrote in message
| news:B9******** *************** ***********@mic rosoft.com...
| > Hello, I am trying to figure out how to do some scripting.
| >
| > Can I script in csharp?
| > Can I script in VBScript if my web page has been developed using csharp? | >
| > Can I iterate though a datatable object in my script file? How can I
| > reference the datatable object which was created in my code-behind form? | >
| > Thanks in advance for your assistance!!
|
|

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3795
by: The_Incubator | last post by:
As the subject suggests, I am interested in using Python as a scripting language for a game that is primarily implemented in C++, and I am also interested in using generators in those scripts... Initially I was justing looking at using Python for some event scripting. So basically an event would trigger an object to run the appropriate Python script, which would be run in it's entirety and return control to the C++ code. After looking...
41
2818
by: Richard James | last post by:
Are we looking at the scripting world through Python colored glasses? Has Python development been sleeping while the world of scripting languages has passed us Pythonista's by? On Saturday Slashdot ran this article on the "best" scripting languages. http://developers.slashdot.org/developers/04/06/12/2125229.shtml?tid=126&tid=156 "Folks at the Scriptometer conducted a practical survey of which scripting language is the best. While...
33
2746
by: Quest Master | last post by:
I am interested in developing an application where the user has an ample amount of power to customize the application to their needs, and I feel this would best be accomplished if a scripting language was available. However, I want to code this application in Python, and I have not yet heard of an implementation of another scripting language into Python. An example of what I mean is this (an implementation of Lua into Ruby -- which I'd...
9
9995
by: What-a-Tool | last post by:
Dim MyMsg Set MyMsg = server.createObject("Scripting.Dictionary") MyMsg.Add "KeyVal1", "My Message1" MyMsg.Add "KeyVal2", "My Message2" MyMsg.Add "KeyVal3", "My Message3" for i = 1 To MyMsg.Count Response.Write(MyMsg.Item(i)) next
0
1578
by: fiona | last post by:
Catalyst Releases Scripting Editions of SocketTools Client and server-side development for Active Server Pages and PHP. Yucca Valley, CA, May 25, 2005 - Catalyst Development Corp (www.catalyst.com) - with over 10 years experience developing Internet components announced that Scripting and Secure Scripting Editions have been added to the SocketTools family of products. The Scripting Editions were designed specifically for client and...
8
2586
by: rmacias | last post by:
I am maintaining an application that was writting in VB6 and has VBA 6.2 integrated into it. The VBA SDK allows the users of the application to generate VBA projects and scripts to gain access to the application and perform product specific functions. This provides maximum flexiability for our users. We are about to convert this application into .NET. In doing some proof of concepts, we were able to integrate VBA 6.4 into a .NET...
6
3587
by: Wolfgang Keller | last post by:
Hello, I'm looking for a spreadsheet application (MacOS X prefered, but Windows, Linux ar available as well) with support for Python scripting (third-party "plug-ins" are ok) and a database interface. Applications that I know of (that they exist) are: MS Excel Quattro
1
5634
by: andrewcw | last post by:
I have used System.Management in the past to extract and walk thru drives & check their type. I can also do it with COM's FileSystemObject. Here I am trying to just use the Management Object after using the Directory class... There seems to be a way to load the System Management Object with string path ( 8 overloads ), but every time I try a variation it crashes. Any ideas ? Thanks Scripting.FileSystemObject FSO = new
2
2038
by: James | last post by:
Are there any classes in c# for this or am I left to use the com interface, which I'm not sure how. And if I have this will it work on a machine that someone has disabled scripting? Finally, if I have MyClass objectA can I give it functions like MakeBigger that would be available from the script? I'm new to this so thanks for any info!!
7
8861
ADezii
by: ADezii | last post by:
The next series of Tips will involve the Microsoft Scripting Runtime Library (Scrrun.dll). This Library is, in my humble opinion, one of the most useful and practical Libraries ever created. With the Scripting Runtime Library, you can retrieve information related to Drives, Folders, Files, and Text Files and set/retrieve certain Attributes of Drives, Folders, Files, and Text Files. Through Methods exposed by this Library, you can also manipulate...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10578
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.