Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


.AtEndOfStream question

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,53667
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> .AtEndOfStream question
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 .AtEndOfStream question - 11/20/2007 1:23:01 AM   
  Brad

 

Posts: 13
Score: 0
Joined: 8/10/2007
Status: offline
I am writing a script that monitors multiple log files in real time using a windows port of "tail" to follow the files and put lines to stdout for scraping.

It is essential that the tail program be used because it allows me to watch log files via FTP, which cannot be done programatically in vbscript, AFAIK. The problem lies in the fact that .stdout.readline will wait for something to read if nothing is present, and .AtEndOfStream will not return false because...well...the stream has not ended because the tail program is still running. What I need is this:

Do until blnPigsFly

  if stdout1 contains a new line
     print the new line
  end if

  if stdout2 contains a new line
      print the new line
   end if

  if stdout3 contains a new line
      print the new line
   end if

Loop


As it stands, one log file has to be written to before it will advance to the next one because StdOut.ReadLine halts the script and waits for input.

Thoughts?

-Brad
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> .AtEndOfStream question Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts