hi
I'm looking for a solution to write multiline text to a text file, similar to writing a log. The goal is to log timecodes when some triggers are triggered. As a temporary solution, I'm sending lines to the log as messages and copy/paste it to a text file after the show, but it would be more convenient (and safe:)) to write it to a multiline text file.
The desired output could be for example:
trigger1: 00:00:01
trigger2: 00:00:05
thanks,
Bence
Hi Bence.
I think I'd go for a little script node in this case. Something like:
--$ inMessage text --$ inWrite trigger --$ outLog text TheFile = [[C:\TEMP\test.txt]] if inWrite == true then outLog = inMessage -- Opens a file in append mode file = io.open(TheFile, "a") -- sets the default output file as test.lua io.output(file) -- appends a word test to the last line of the file io.write(inMessage .. '\n') -- closes the open file io.close(file) end