Re: Output to txt:
From: TDM (tdm3_at_verizon.net)
Date: 04/03/04
- Next message: cyberia: "How to get the time of file"
- Previous message: tomthumbkop: "Re: Launching a script when IE is started"
- In reply to: Roland Hall: "Re: Output to txt:"
- Next in thread: Roland Hall: "Re: Output to txt:"
- Reply: Roland Hall: "Re: Output to txt:"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 03 Apr 2004 14:14:49 GMT
Roland,
I will give it a try, here goes.
My current need arises from a script I wrote to parse the event logs.
The output starts with the column titles. They can range in string length
based on what event ID I query on. Then to follow, are all the entries
for the queried event ID. I just think it would be nice for all the entries
to line up with the column titles. Some if the entries also have very long
string entries, so in many situations, the column title is not as long as
the
column entry. To get around this for now, I format the output as html
and set up all the entries in tables with a border so it looks somewhat
decent and it all lines up. But, the ideal solution for me would be a text
file formatted with all the entries left aligned with the column title. The
harry part(at least for me) is when the "entry" string length is large, then
you would need to wrap the lines a number of times as needed to get it
to fit nicely in the "column". At the very least, it would be nice to simply
have the entry left align with the column title. I will try to illustrate.
ColTitle1 ColTitle2
ColTitle3
Coll entry 123456790 Col entry yada yada yada yada Col entry
xxxxxxxxyyyy
Not sure how this will come across in your news reader. But the Col
entries can be very long in length at times. I tried stuffing all this in to
arrays as the titles come before the entries, so to line them up properly,
you need to know the max string length for each column in order to
line up entries correctly. But, I ran short of time and chose the HTML
solution instead. To make things even a bit more messy, the number
of columns is not fixed, it can vary based on the event ID you query.
Another ray of hope(no pun intended Ray at work) is the logParser supports
various different output formats that I have not messed with yet. I am
currently
using the "native" output format. If I find the time, I will play with this
some but
for now, I am almost there. I just need some help with formatting the
output.
Some general things to try would be nice, and I sure hope all this
makes sense.
TIA
TDM
"Roland Hall" <nobody@nowhere> wrote in message
news:#5c7fEWGEHA.2612@TK2MSFTNGP09.phx.gbl...
> "TDM" wrote in message news:qsebc.5077$KK3.4347@nwrddc02.gnilink.net...
> :
> : Roland,
> :
> : Sometimes vbTab just aint enough. I too am looking for a decent
formatting
> : solution. In Vb, you had the "Tab()" function where you could specify
the
> : exact column on the line, do you know of any way to accomplish this in
> : vbScript ?
>
> Can you provide more detail on how you want to use the file? What happens
> to it after it is created?
>
> --
> Roland Hall
> /* This information is distributed in the hope that it will be useful, but
> without any warranty; without even the implied warranty of merchantability
> or fitness for a particular purpose. */
> Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
> WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
> MSDN Library - http://msdn.microsoft.com/library/default.asp
>
>
- Next message: cyberia: "How to get the time of file"
- Previous message: tomthumbkop: "Re: Launching a script when IE is started"
- In reply to: Roland Hall: "Re: Output to txt:"
- Next in thread: Roland Hall: "Re: Output to txt:"
- Reply: Roland Hall: "Re: Output to txt:"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|