Please help
I'm using the following text to write to a logfile the date and time the script started:
String Fname = "Logfile.txt" ;String to set logfile name
; Open the logfile for write
if fopen 0 Fname APPEND
;Write the current date and time into the log file
fputs 0 "Studio Automation Macro initiated on "
fputs 0 $DATE
fputs 0 " & "
fputs 0 $TIME
fputs 0 "^M"
fclose 0
endif
At the end of the script.... the ^M is putting a ^M in the logfile instead of putting in a carriage return. If I don't put the ^M in quotes, the script won't compile. Any idea what I should fputs into the file to start a new line so all the log entries are not put together. I do want them all in the same log file, just not all on the same line.
Thanks,
b.l.
I'm using the following text to write to a logfile the date and time the script started:
String Fname = "Logfile.txt" ;String to set logfile name
; Open the logfile for write
if fopen 0 Fname APPEND
;Write the current date and time into the log file
fputs 0 "Studio Automation Macro initiated on "
fputs 0 $DATE
fputs 0 " & "
fputs 0 $TIME
fputs 0 "^M"
fclose 0
endif
At the end of the script.... the ^M is putting a ^M in the logfile instead of putting in a carriage return. If I don't put the ^M in quotes, the script won't compile. Any idea what I should fputs into the file to start a new line so all the log entries are not put together. I do want them all in the same log file, just not all on the same line.
Thanks,
b.l.