![]() |
![]() ![]() |
![]()
|
Active Scripting Continued from Introduction Active Scripting is a relatively new scripting standard from Microsoft. There isn't enough space in this article to discuss it thoroughly, so we'll take a quick look at Active Scripting from 10,000 feet. Until now, there was not a standard method of adding scripting support to applications under Windows. If you wanted to make an application scriptable, there were two choices: one, roll your own scripting, or two, buy a third party's scripting technology. Both of these solutions are less than perfect, and both lock the developer into a proprietary technology. To remedy this situation, Microsoft introduced Active Scripting--a set of ActiveX interfaces that let developers add language-independent scripting to their applications. That's important, so I'll say it again--language-independent scripting. Active Scripting accomplishes this by using two main components, scripting hosts and scripting engines. Any application that can be driven by Active Scripting is a scripting host. From the scripting host's point of view, there is no scripting language; that is, the host does not process any scripting-language commands. The host starts a scripting engine, feeds lines of a script to it, and responds to its output, but the host never looks at the actual script. The scripting engine deals with all language-dependent issues. A scripting engine must be written for each scripting language that Active Scripting supports, although to the scripting host, they all look the same. Microsoft currently supplies scripting engines for VBScript and JavaScript, and third parties are working on scripting engines for Perl, Rexx, Python, and other languages. The beauty of this scheme is that it lets end users write scripts in the languages they like best. With the above background, the name Windows Scripting Host probably has a little more meaning to you now. At a base level, the Windows Scripting Host is an Active Scripting host that lets scripts be executed in the Windows shell. You can write a script in any supported language, and the Windows Scripting Host will use the script file's three-character extension to determine what language you wrote the script in (.VBS for VBScript, for example) and which scripting engine to start. Published as Operating Systems in the 02/10/98 issue of PC Magazine. |
|
TOP | ![]() Copyright (c) 1998 Ziff-Davis Inc. |