10-05-2012 10:00 AM
I save system events in a text file,for example when system give warning message i want to write it red
10-05-2012 10:11 AM
A raw text file does not have any formatting. Maybe you could write to a Word document and format it in there.
10-05-2012 10:11 AM
ASCII does not support text color, or any other style settings. You can make custom reporting like using HTML or Word to have formatting.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-05-2012 11:04 AM
As others have said, a standard text file has no formatting. If you want to avoid a formatted language however, you could always put a keyword at the start of each appropriate line (so warning: text detailing the warning or error: text detailing the error) then write a specific reader to give you the colours. The reader could be in LabVIEW or just an add on into something like notepad++ without too much fuss.
So a programmed reader would look at the first line up until the :, then depending on the text beforehand colour the line appropriatly.
10-05-2012 12:41 PM
You could add "rich text" tags, name the file *.rtf, and open it in wordpad.
10-05-2012 12:46 PM
You could also add HTML tags and open the file in a browser.
10-05-2012 04:35 PM
As others have mentioned, if you want to view text in different colors with an viewer/editor tool outside of LabVIEW, you must provide the necessary formatting for that tool.
If it works for your application to view the file using LabVIEW you can do this:
1) Place a unique key in each line that identifies an error.
2) Display the text in a Listbox and color each line based on that unique key.
You can fairly easily provide a stand alone viewer if needed.
This technique can also be expanded to provide multiple colors.
steve