Let me start out by saying I'm not a coder anymore and at this point fail in all aspects. For this particular script I outsourced to talented folks that are not me. I've ran the script thru the CLI on the SAM server and everything appears to work correctly. I think I've directed the coder incorrectly for what to echo or how to echo. Could someone provide some insight in what I'm doing incorrect?
----------Code Begins-----------
Dim strFilePath, objFSO, objFile, objRegExp, strPatternLine, strPatternContent, strLine, objMatches, Statistic
Const ForReading = 1, ForWriting = 2, ForAppending = 8
strFilePath = "C:\Testing.htm"
' Create File System and File objects
Set objFSO = CreateObject("Scripting.FileSystemObject")
' Create regular expression object
Set objRegExp = new regexp
' Set RegExp properties
objRegExp.IgnoreCase = true
strPatternLine = "type generic"
' strPatternContent = "\((.*)\)"
strPatternContent = "^.*?\([^\d]*(\d+)[^\d]*\).*$"
If objFSO.FileExists(strFilePath) Then
' Open file
Set objFile = objFSO.OpenTextFile(strFilePath, ForReading)
' Parse file
Do While objFile.AtEndOfStream <> True
strLine = objFile.ReadLine
' Set the appropriate RegExp pattern
objRegExp.Pattern = strPatternLine
' Check for a match
If objRegExp.Test(strLine) Then
' WScript.Echo strLine
' Set the appropriate RegExp pattern
objRegExp.Pattern = strPatternContent
' Clear previous matches, if any
Set objMatches = Nothing
' Check for a match
Set objMatches = objRegExp.Execute(strLine)
Statistic = ""
' Iterate the matches
For Each objMatch in objMatches
For i = 0 to (objMatch.SubMatches.Count - 1)
Statistic = Statistic & objMatch.SubMatches(0) & vbCrlf
Next
Next
WScript.Echo "Statistic.NAT:" & Statistic
End If
Loop
' Close file
objFile.Close
Else
WScript.Echo "File Not Found"
End If
----------Code Ends -----------
When I press the "Get script output" button I get this below message.
If this looks correct and there isn't any feedback for the code, does anyone know where to look to debug the application as Orion executes it?