在将由 cscript.exe 执行的 VBScript 中创建 Windows 复选框
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/596878/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Creating a Windows checkbox in a VBScript that will be executed by cscript.exe
提问by matt_dev
If I have a VBScriptlike...
如果我有一个VBScript的像...
inputControl1 = InputBox("Hello World")
WScript.Quit
How can a check box be created in there rather then the InputBox?
如何在其中创建复选框而不是 InputBox?
I know VBScript itself does not have a checkbox control like the InputBox, but is there some library I can use to do something like the following?
我知道 VBScript 本身没有像 InputBox 这样的复选框控件,但是是否有一些库可以用来执行以下操作?
inputControl1 = CreateObject("library.checkboxcontrol")
WScript.Quit
回答by slamidtfyn
Couldn't you use a yes/no msgbox instead?
你不能改用是/否 msgbox 吗?
dim Answer
Answer=msgbox("Your question here",4)
回答by Rob Haupt
You could use an HTA. That would be more involved than a VBScript, but it would be written in VBScript + HTML. There would be a few IE restrictions you may have to work around though.
您可以使用 HTA。这将比 VBScript 更复杂,但它将用 VBScript + HTML 编写。不过,您可能需要解决一些 IE 限制。
Alternatively if you get VB.NET Express and code using that. It is a different language of course.
或者,如果您获得 VB.NET Express 并使用它进行编码。当然,这是一种不同的语言。