先声明一下:
wscript.echo(“string”) 子程序,输出字符串;
MsgBox(“Text.”,style_of_button,“Caption”) 子程序,消息框;
InputBox(“Text.”,“Caption”,“The string which is in the form.”) 函数,输入框。
实在不懂,就运行一下再对照一下。
(请务必在cscript.exe内(在命令提示符中)运行!!!) D:__Code\VBScript-JScript\VBScriptMsgBox-InputBox.vbs
【第一块介绍MsgBox各种按钮。 】
【第二块介绍MsgBox各种按钮的返回值。】
【第三块介绍InputBox与MsgBox的应用。】
call MsgBox("VBOK",0,"0")
call MsgBox("VBOKCANCEL",VBOKCANCEL,"1")
call MsgBox("VBABORTRETRYIGNORE",VBABORTRETRYIGNORE,"2")
call MsgBox("VBYESNOCANCEL",VBYESNOCANCEL,"3")
call MsgBox("VBYESNO",VBYESNO,"4")
call MsgBox("VBRETRYCANCEL",VBRETRYCANCEL,"5")
call wscript.echo("VBOK:1")
call wscript.echo("VBCANCEL:2")
call wscript.echo("VBABORT:3")
call wscript.echo("VBRETRY:4")
call wscript.echo("VBIGNORE:5")
call wscript.echo("VBYES:6")
call wscript.echo("VBNO:7")
Dim str
str = InputBox("Look,it's the value which you click the button will return.","InputBox","Input 'str'...")
call MsgBox(str,VBOK,"MsgBox")