I'm trying to get the ping results that are written to a .txt file fed into a variable. I'm using SkipLine and Skip to get to the "Time" results for the reply and I don't know how to get just the two or three digits of the reply. I can get up to the digits, but then I am doing ReadLine and that gets the digits plus the rest of the text in the line (which is something like TTL=120)
I can do a case or an if to evaluate the statement and turn the variable into what I want, like this:
i = oFSO.Readline
if i = "10ms TTL=120" then
i = "10"
else blah blah blah
The bad thing is, when I do the ReadLine, it catches the EOL character so that IF statement never works because I can't key in the EOL character.
So I'm totally open to any suggestions here.. I'm sure there is a better way. Or just someone can suggest how to trim everything after the last digit, be it a 2 or 3 digit result...
Thanks
I can do a case or an if to evaluate the statement and turn the variable into what I want, like this:
i = oFSO.Readline
if i = "10ms TTL=120" then
i = "10"
else blah blah blah
The bad thing is, when I do the ReadLine, it catches the EOL character so that IF statement never works because I can't key in the EOL character.
So I'm totally open to any suggestions here.. I'm sure there is a better way. Or just someone can suggest how to trim everything after the last digit, be it a 2 or 3 digit result...
Thanks