如果未输入密码,我将如何结束vbs文件,如果单击“Okay”,它将继续。 如果没有输入,我想要结束。 那可能吗?
If InputBox("Please enter the passcode.", "Restricted access") = "Passcode" Then MsgBox "Correct passcode. You may continue.
Dim speaks, speech
name=inputbox("What's your name?", "WELCOME")
speaks=("Welcome ") + name
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks
答案 0 :(得分:-1)
你的意思是什么?
Dim strPassword As String
strPassword = InputBox("Please enter the passcode.", "Restricted access") & ""
If strPassword = "Passcode" then
MsgBox "Correct passcode. You may continue."
Dim speaks, speech
name=inputbox("What's your name?", "WELCOME")
speaks=("Welcome ") + name
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks
else
WScript.Quit
endif