Is it possible to save the output of "MessageModal>" to a log file.csv (or something like that)?
Many thanks
k
MessageModal> To Log File???
Moderators: JRL, Dorian (MJT support)
Hi Kriemer,
I don't know that there is a way to capture the output for messagemodal but what you could do is in addition to your messagemodal line just put a writeln command below that has the same text.
Here is an example
let>mymessage=This is my message!
messagemodal>mymessage
writeln>c:\log.txt,result,mymessage
I don't know that there is a way to capture the output for messagemodal but what you could do is in addition to your messagemodal line just put a writeln command below that has the same text.
Here is an example
let>mymessage=This is my message!
messagemodal>mymessage
writeln>c:\log.txt,result,mymessage
I have found a solution to my question. It is not exactly what I asked but it is mostly what I want.
Of course this opens the next question, Is there any way to limit log file size. I expect the simplest way would be to delete the file based on file size.
Any additional ideas to enhance log files?
Regards
k
Code: Select all
//Set Variable
Let>Missing=Missing:%CRLF%
//Error Window & Log File Message
Let>LogFile=c:\Reuters Log.txt
GetDate>vToday
Timestamp>LogFile,%vToday%,%Missing%
Any additional ideas to enhance log files?
Regards
k
I agree with sarver311 that if it is your script you should be able to write the same data you displayed to a file. However, there are times when you're dealing with messages from an old script or a compiled script or someone else's script. In those instances try the technique in this post from jpuziano.Is it possible to save the output of "MessageModal>" to a log file.csv (or something like that)?
http://www.mjtnet.com/forum/viewtopic.php?t=5848
Or maintain a set number of lines in the log by deleting old lines. You'd have to:Is there any way to limit log file size. I expect the simplest way would be to delete the file based on file size.
- write to the log file
- then read into the script the entire log file
- then write out line by line a fixed number of lines to a temporary file
- then delete the old log file
- then rename the temporary file to the log file name
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: