ActiveScript is the term used to describe a set of interfaces that permit a scripting language interpreter to be used by an application that wants to provide scripting capability to the user. It is an abstraction mechanism which allows the user to specify what scripting language to use without having to change the application. For example, the user can use PerlScript [
1] if she wants to script in
Perl, rather than VBScript.
[Provide relevant URLs to define and further discuss this area]
An Active Script engine exposes a scripting language interpreter through the Active Script interfaces. Two Tcl Active Script engine prototypes exist, as of spring 2002:
Tclscript and
tcom 3.8 and above.
IIS, Internet Explorer and Windows Script Host [
2] are examples of applications that host Active Script engines through the Active Script interfaces.
IIS might be able to interpret this
ASP:
<%@ LANGUAGE = "TclScript" %>
<%
Response.Write "Hello world!"
%>
In Internet Explorer:
<html>
<head>
<title>TclScript Test</title>
<script language="TclScript">
proc setText {newValue} {
text1 value $newValue
}
</script>
</head>
<body>
<input id="text1" name="text1" disabled="1">
<p>
<input type="button" id="button1" name="button1" value="Hello"
onclick="setText hello">
<input type="button" id="button2" name="button2" value="World"
onclick="setText world">
</body>
</html>
In Windows Script Host:
WScript Echo "Hello world!"
MHo any additional examples or links to any documentation???
MG Do these methods only allow for ActiveScript-enabled applications to run Tcl scripts, or is there some way to access ActiveScript (and allow people to run scripts written in other languages) from a Tcl application?