Im guessing that if you have an /aline or /echo to the window you could do something like:
/echo window stuff | /savebuf $line($active,0) *windowname* file-to-save-to.ext
or
/aline @window stuff | /savebuf $line($active,0) @window file-to-save-to.ext
Does that help at all?