返回 WshNamed 对象(命名参数集)。
Object.Named
Named 属性返回 WshNamed 集(命名参数集)。使用参数的名称来查找是否包含该参数并访问其值。
下面的代码显示已命名和未命名命令行的参数数目。
<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>