Hmm. Is it so difficult to at least replicate the syntax of a command from 1000 examples in the manual? Printf is the most often used function in C. This prints to the window and to the log:

printf("\nStuff");

And this only to the log;

printf("#\nStuff");

You got it right in your first code, so why the problems now? But if you definitely can't get familiar with all those commands, syntax, and tiny quotation marks, the last resort would be contacting Support and let them program your script.