TwScript: TW.target.selectAll();
as stated
To replace all text, perhaps something like,
TW.target.selectAll();
TW.target.insertText("hello");
Created with the Personal Edition of HelpNDoc: Free help authoring environment