返回 WshUnnamed 对象(未命名参数集)。
Object.Unnamed
Unnamed 属性返回 WshUnnamed 集(未命名参数集)。参数按其在命令行中的输入顺序展示。第一个未命名参数的索引号为 0。
下面的代码显示已命名和未命名命令行的参数数目。
<package> <job id="JS"> <script language="JScript"> var argsNamed = WScript.Arguments.Named; var argsUnnamed = WScript.Arguments.Unnamed
; WScript.Echo("There are " + argsNamed.length + " named arguments."); WScript.Echo("There are " + argsUnnamed.length + " unnamed arguments."); </script> </job> <job id="VBS"> <script language="VBScript"> Dim argsNamed, argsUnnamed Set argsNamed = WScript.Arguments.Named Set argsUnnamed = WScript.Arguments.Unnamed
WScript.Echo "There are " & argsNamed.Count & " named arguments." WScript.Echo "There are " & argsUnnamed.Count & " unnamed arguments." </script> </job> </package>