All Elements
ELEMENT: <object>
The
<object>
tag can be used to create an object. The
<object>
tag must be placed within the
<job>
tags. Once an object is created, it can be used anywhere within the scope where the object was created. An object must be created using either its ProgID or ClassID, but not both. The object can be identified by a variable name.
There is no way to create an events sink for objects that are created with the
<object>
tag.
Syntax:
<object id="objID" [progid="progID" | classid="clsid:GUID"] />
Attribute: id
The
id
attribute gives a unique identifier to the object being created. It must be a valid variable name.
Attribute: progid
The optional
progid
attribute can be used to create an object based on its ProgID.
Attribute: classid
The optional
classid
attribute can be used to create an object based on its ClassID. A valid ClassID may look like this: "clsid:13709620-C279-11CE-A49E-444553540000".
The following sample code illustrates the use of this tag.
<?XML version="1.0" ?>
<!-- Filename: demo.wsf-->
<package>
<job>
<object id="shell" progid="WScript.Shell"/>
<script language="VBScript">
shell.Popup "This is VBScript"
</script>
<script language="JScript">
shell.Popup ("This is JScript") ;
</script>
</job>
</package>
Output:
This is VBScript
This is JScript
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information