Provides access to the items in the WshNamed object.
Parameters
-
Object
-
WshNamed object
-
key
-
The name of the item you want to retrieve.
Remarks
Example
In the following example, two named arguments are supplied to run a script. Inside the script, code causes the named arguments to be output. The Item property is used to index into the named arguments collection.
The following line is typed at the command prompt to run the script.
| Copy Code |
---|
myScript.vbs /c:arg1 /d:arg2 |
If the following code is executed inside the script, then the output is:
arg1
arg2
| Copy Code |
---|
WScript.Echo WScript.Arguments.Named.Item("c")
WScript.Echo WScript.Arguments.Named.Item("d") |
See Also