logo.jpg (4128 bytes)
Home
Main Page
Links
Classical
Popular
Programming
Shareware
Emulation
Opus
Gtr & Fl.
Concerto
Code
Status bar
Math
Perl
Base Address
Meta Script
DHTML
WSC
Programs
Markup
Clipboard

 

Windows Script Components

With Windows Script Components (WSC) you can package scripts written in any language with a supporting ActiveX Scripting Interface-such as VBScript, JScript PerlScript, and Python-as COM components. These components can be used as automation objects in applications developed with tools like Visual Basic, and Dynamic HTML (DHTML) behaviours.

Advantages

dsbullet.jpg (722 bytes) Efficiency
dsbullet.jpg (722 bytes) They are easily created, maintained, and deployed.
dsbullet.jpg (722 bytes) A type library can be created to be taken advantage of by object browsers.
dsbullet.jpg (722 bytes) DHTML behaviours add interactive effects to Web pages, that are easily reused.

Creating

Creating a scripting component is easy. A WSC file is an XML document with elements that define the component and its behaviour.

Elements

dsbullet.jpg (722 bytes) <package> Contains multiple component definnitions.
dsbullet.jpg (722 bytes) <component> Contains the script component definition.
dsbullet.jpg (722 bytes) <reference> Contains type library references.
dsbullet.jpg (722 bytes) <public> Encloses definitions for properties, methods, and events that your script component exposes. The definitions point to variables or functions defined in a separate <script> block.
dsbullet.jpg (722 bytes) <registration> Information used to register the component as a COM component.
dsbullet.jpg (722 bytes) <script> Contains the script used to implement the logic of your script component, depending on what type of COM component you are creating. For example, if you are creating a COM Automation component, you declare properties, methods, and events in a <public> element, and then write the script to define them in one or more <script> elements.
dsbullet.jpg (722 bytes) <implements> Specifies the COM interface handler for the script component, which determines what type of COM component the script component will be. For example, by specifying <implements type=ASP>, you implement the ASP interface handler and therefore get access to the ASP object model in your script component.

The <public> element is used to specify that a script component implements the COM Automation interface handler. Therefore, you don't need to create an <implements> element for the Automation handler.

Note   The script component run-time includes interface handlers for Automation (exposed using the <public> element), for ASP, and for Internet Explorer 5.0 DHTML Behaviors. Other interface handlers are available as external DLLs. For more information about additional interface handlers and script components, see the Microsoft Scripting Technologies Web site.

dsbullet.jpg (722 bytes) <object> Contains information about an object that you use in your script, such as another COM component.
dsbullet.jpg (722 bytes) <resource> Contain values that should not be hard-coded into script component code. Resource elements can include information that might change between versions, strings that might be translated, and other values
dsbullet.jpg (722 bytes) <comment> Contain text that is ignored when the script component is parsed and executed.

 

Aaron L. Stephanus Do YOU want YOUR choice of a FREE laptop ?