Provides access to the items in the WshNamed object.
Object.Item(key)
Parameters
Object
WshNamed object
key
The name of the item you want to retrieve.
Remarks
The Item property returns a string. For collections, it returns an item based on the specified key. When entering the arguments at the command line, you can use blanks in string arguments if you enclose the string in quotes. Consider the following example:myscript.vbs /stringarg:"This string has spaces"
The quotes will be removed in the WshNamed collection. For an argument to be in the WshNamed collection, it must have been used on the command line. If the argument has no value (such as a simple argument or an empty string), the Item property returns an empty string. Requesting a non-existent named argument from the Item property causes an error. To check if an argument exists, use the Exists method.
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:
Tips to improve your search results...UFT OneVBScript ReferenceUFT One VBScript Reference14.03 and higherAllView Local Help CenterView Online Help CenterbackGo back in browser historyforwardGo forward in browser historyRemove search highlightsnext topicGo to next topicprevious topicGo to previous topicPrint the current topicVersion: