首页 > 电脑

VBS菜鸟首编程序求指点

更新时间2019-09-23 05:36:23

代码如下

-------------分割线------------------

WSHshellA.run "cmd.exe /c shutdown -r -t 120 -c ""xxx"" ",0,true

dim a

while(a<>"xxx")

a = inputbox ("xxx""xxx"" ","xxx","xxx",8000,7000)

msgbox chr(13) +chr(13) +chr(13) +a,0,"Msgbox"

While Wend If(a<>"xxx") Then MsgBox "xxx",,"xxx"

WSHshellA.run "cmd.exe /c shutdown -a"

Else

MsgBox "xxx",,""xxx"

WSHshellA.run "cmd.exe /c shutdown -r -t 5 -c"

------------------分割线--------------------

错误是第6行第7个字符有语法错误(800A03EA)

大神指点谢谢

xxx不用管,是我要填入的内容

在vbs中你那句While Wend If(a<>"xxx") Then Msgbox "xxx",,"xxx"应该这样写:

While If(a<>"xxx") Then

msgbox"xxx"

这样改了后应该没问题了,(亲测过)

还有,在vbs中if语句尽量不要写在一行,改一下习惯也许对你很有帮助

上一篇:方舟生存进化potiontable工作台怎么使用

下一篇:vivox23儿童模式中的使用情况里是什么,请截图