Youd put them in your "send" box (of the trigger) and "send to" script.
So itd be...
SendToNotepad "LogWindow", "Lets start a log" & VBCRLF
to send to it (and start it)
So if you had a trigger itd be:
SendToNotepad "LogWindow", "%0" & VBCRLF
(%0 is the full line that matched)
and then to save (whether you want to do it at the same time, or in a seperate thing) use this:
SaveNotepad "LogWindow", "C:\Path\logfile.txt", 1
That will save over the old one, so if you start a new session, you'll lose older stuff (unless you change the log name accordingly).
I believe OpenLog (I was perusing the function lits) opens a log, and then writes things to it (all the output), but if it doesnt, then that would be better. Or you could open the log, write to it, and then close it again. Then you could append, and not worry about overwriting stuff.
(Like this:
OpenLog "logfile.txt", true
writelog "%0"
CloseLog
that... should work. Assuming you have no other log file open. And that would be better, and cleaner. And you wouldn't have to worry about the next paragraph.
Also, notepad windows fill up over time. Theres a plugin regarding this I believe... Search for "notepad full" or something in this forum. |