PhonShell window will become child to whatever frame opens it.  A new variable 'window' is made available to the global script context.
Write script output to buffer instead of console using '>' and '>>' for truncate and append modes respectively.