VBScript syntax check

Any good utilities for checking VBScript syntax without actually running the script?

What I get is if I am something like:

If (year == "2005" && type == 1) Then
...
End If

Is there a tool that will tell me that '& &' really should be "AND" and "==", just "="?

+5
source share
5 answers

Actually, I think there is a way. The Script control contains an Execute method similar to the HTML VBScript Eval method. You can give it a string and it will parse it.

. http://www.microsoft.com/downloads/details.aspx?FamilyID=d7e31492-2595-49e6-8c02-1426fec693ac&displaylang=en

MSDN , . http://msdn.microsoft.com/en-us/magazine/cc302278.aspx

MSDN Script http://msdn.microsoft.com/en-us/library/aa227633(VS.60).aspx

- .. ( )

Dim ScriptControl1 as New MSScript
ScriptControl1.ExecuteStatement "If (year == "2005" && type == 1) Then..End If" 
+1

script, , - , , , , "WScript.Quit" script ( Option Explicit, ), cscript.exe wscript.exe.

:

Option Explicit
WScript.Quit
Dim year
If (year == "2005" && type == 1) Then
    WScript.Echo "Hello"
End If

undefined (, "" ), , .

+7

Visual Studio (2005 ) IntelliSense DLL, .

, , . " ".

0

, , , , vbscript , , , .

0

. vbscript asp, - http://aspclassiccompiler.codeplex.com/, , -, asp asp. .

, - , , . , .

0

All Articles