0
votes

I am attempting to learn regex syntax in VBScript by running CurrencyEx.vbs from the following link: https://msdn.microsoft.com/en-us/library/ms974570.aspx

I fixed the error on line 10 as shown on this query: Unable to run while loop related to regular expressions in vbscript running through Windows based script host

Now this script doesn't meet its intended purpose as I don't see a dialog box returned by the inputbox() method on line 6 for inputting custom text:

inputstr = inputbox("I will help you convert USA and CAN currency. Please enter the amount to convert:")

The script ends with an exit code 0 in vbsedit.exe. I cannot figure out my mistake, so any suggestions are welcome.

1
Post the rest of the code that surrounds this. - RLH

1 Answers

0
votes

Given that the script starts with

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:")
...

and you "don't see a dialog box returned by the inputbox() method on line 6", I think you didn't add the call of the Sub to your program. So pre/ap-pend a line

CurrencyEx

to the script.