All Objects
WScript Object
OBJECT: WshArguments
The
WshArguments
object is a read-only collection object that contains the argument list passed to the host executable (accessible through the
WScript.Arguments
property). This object cannot be instantiated directly. It can only be accessed through the
WScript
object.
As with all collection objects, the
WshArguments
collection can be iterated using the VBScript "For Each .. In" statement, but cannot be iterated using the JScript "for .. in" syntax.
PROPERTIES
Syntax:
object[
.Item]
(lngIndex)
length Property
The
length
property is read only and returns a Long value which is the number of items in the collection. For JScript consistency,
length
should be lowercase.
Syntax:
object.
length
METHODS
Count Method
The
Count
method returns a Long value which is the number of items in the collection.
Syntax:
object.
Count
()
Item Method
The
Item
method is the default method of the
WshArguments
object. It references an array of strings containing the arguments. If
lngIndex
is specified, this method returns the element in the collection at the specified position. Indexing starts at zero. If there is no element at the requested index, a "Subscript out of range" error is generated.
Syntax:
object.
Item
([lngIndex])
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information