如何检查参数是否被调用到vbscript?

时间:2016-08-21 02:02:55

标签: arrays if-statement vbscript arguments

我尝试使用if语句,但是我收到错误gem simple_form,我知道为什么会收到错误。如何检查是否为vbscript脚本调用了一个参数。

Subscript out of range

1 个答案:

答案 0 :(得分:2)

If WScript.Arguments.Count > 0 Then
  WScript.Echo "Arguments were passed"
End If

args = WScript.Arguments.Count
WScript.Echo "This many arguments were passed " & args