vbscript 中功能失调的输入框方法在命令提示符下为 运行 到 wscript.exe
Dysfunctional inputbox method in vbscript being run through wscript.exe on command prompt
我正在尝试通过 运行 CurrencyEx.vbs 从以下 link 中学习 VBScript 中的正则表达式语法:https://msdn.microsoft.com/en-us/library/ms974570.aspx
我修复了第 10 行的错误,如此查询所示:
现在这个脚本不符合预期目的,因为我在第 6 行没有看到 inputbox() 方法返回的用于输入自定义文本的对话框:
inputstr = inputbox("I will help you convert USA and CAN currency. Please enter the amount to convert:")
脚本在 vbsedit.exe 中以退出代码 0 结束。我想不出我的错误,所以欢迎任何建议。
鉴于脚本以
开头
Sub CurrencyEx
Dim inputstr, re, amt
Set re = new regexp 'Create the RegExp object
'Ask the user for the appropriate information
inputstr = inputbox("I will help you convert USA and CAN currency. Please enter the amount to convert:")
...
而你"don't see a dialog box returned by the inputbox() method on line 6",我认为你没有将Sub 的调用添加到你的程序中。所以pre/ap-pend一行
CurrencyEx
到脚本。
我正在尝试通过 运行 CurrencyEx.vbs 从以下 link 中学习 VBScript 中的正则表达式语法:https://msdn.microsoft.com/en-us/library/ms974570.aspx
我修复了第 10 行的错误,如此查询所示:
现在这个脚本不符合预期目的,因为我在第 6 行没有看到 inputbox() 方法返回的用于输入自定义文本的对话框:
inputstr = inputbox("I will help you convert USA and CAN currency. Please enter the amount to convert:")
脚本在 vbsedit.exe 中以退出代码 0 结束。我想不出我的错误,所以欢迎任何建议。
鉴于脚本以
开头Sub CurrencyEx
Dim inputstr, re, amt
Set re = new regexp 'Create the RegExp object
'Ask the user for the appropriate information
inputstr = inputbox("I will help you convert USA and CAN currency. Please enter the amount to convert:")
...
而你"don't see a dialog box returned by the inputbox() method on line 6",我认为你没有将Sub 的调用添加到你的程序中。所以pre/ap-pend一行
CurrencyEx
到脚本。