Hello fellow Excelbots:
I need some help with how to parse through a stream of output and find/extract a string. There seems to be a lot of posts regarding parsing a text file, which is not exactly what I am doing. I'm calling an executable which returns 4 lines of output, as follows (line numbers not present in output):
Line1: //
Line2: //
Line3: // some text here
Line4: a string of exactly 32 characters, then a filename
I need to grab the string of characters as one var and the filename as another, so I can perform other logic on them. How do I tell Excel to look for a string of exactly 32 characters in the data stream?
So far, I am just able to loop through each line of output and ignore lines that start with a forward slash. This takes place after wscript.shell calls the executable and objStdOut is set
While Not objStdOut.AtEndofStream
strHASH=objStdOut.ReadLine
If Not InStr(1,strHASH,"/") = 1 Then ' this line now skip the lines of output that start with a slash
MsgBox strHASH
End if
Wend
Any help figuring out how to grab the 32 character string and file name found in the 4th line of the output would be much appreciated.
Bookmarks