我的代码在我的vbs中出了什么问题?

时间:2015-03-13 03:48:49

标签: vbscript

我的代码出了什么问题?

Option Explicit
Dim obj, x, y, v
set obj=createobject("wscript.shell")
x=inputbox("How many Beefs would you like to test?","WindowsDGK Beef Test")
if not IsNumeric(x) then
    msgbox"Please enter a number!"
End If
if IsNumeric(x) then
    do
        y=y+1
        obj.run "cmd.exe"
    loop until x=y
        v=msgbox("Do you want to run again?","WindowsDGK Beef Test",vbYesNo)
            if v=6 then
                obj.run wscript.fullname
            End If
            If v=7 then
                wscript.quit
            End If
End If

1 个答案:

答案 0 :(得分:0)

在VBScript中的if语句中不能有2个变量。示例:y =(x)不起作用,因为它认为输入是字符串而不是整数。你真的需要编辑你的帖子。