Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
WshArguments Object
Method: WshArguments.Item
object[.
Item]
(lngIndex)
The
Item
method is the default method of the
WshArguments
object. It takes a single argument of type Long, and 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.
The following VBScript code displays the first and second arguments passed to the current script. The output shown would be observed if the script were invoked with two command-line arguments: "abc" and "def". The example also illustrates both forms of syntax that can be used to call the default
Item
method.
Code:
WScript.Echo "The first argument is", WScript.Arguments(0)
WScript.Echo "The second argument is", WScript.Arguments.Item(1)
Output:
The first argument is abc
The second argument is def
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information