Caled, I can't remember if I mentioned this in IRC...
setTextFormat has been re-enabled in the latest source release, although the 'red' component of the foreground colour is broken, here's a template (bg/fg is background/foreground, r/g/b are just colours):
setTextFormat(window, bg_r, bg_g, bg_b, fg_r, fg_b, fg_g, bold, italics, underline)
Where the last three can be 0 or 1. The other problem with setTextFormat is that it needs to be called before writing any text, else all the old crap remains the same colour. I don't think that'll be a problem for you, though.
I've been trying to use moveCursor and moveCursorEnd. along with selectCurrentLine or selectString(line,1) to change existing text. But for whatever reason the move commands wont let the cursor leave the main window. Even if I use moveCursor("notes", 1, 1), deleteLine() will just operate on the first line in the main window...
So yeah, I'm not sure how sorry