教我做一个vbs脚本对话框!

来源:百度知道 编辑:UC知道 时间:2024/05/15 08:31:54
谁教我做一个脚本对话框!比如说提示'123'回答'456'就运行某一程序!回答错误就运行另一程序

----------
set ws=createobject("wscript.shell")
a=inputbox("1+1=?","请回答")
if a="2" then
ws.run "c:\" '正确则打开C盘为例,改为你要运行的程序绝对路径即是运行其它程序.
else
ws.run "d:\" '错误则运行其它程序.
end if
----------

Dim wsh
set wsh=createobject("wscript.shell")
input=inputbox("123","请回答")
if input="456" then
wsh.run "c:\windows\system32\notepad.exe" '要运行的程序的路径.
else
wsh.run "c:\windows\system32\calc.exe" '回答错误就运行另一程序
end if