When working on a script for a NWC tool, it can be helpful to see what is being passed to the script, especially the Fake and Context lines. This reads the clipboard and copies it to StdErr where a return code of 1 will display it. I called it seeClip.js:
WScript.StdErr.Write(WScript.StdIn.ReadAll());
WScript.quit(1);
Create the file in your usual Scripts folder (must end in
.js). When installing it as a new script, browse for the name of it, then add
"wscript " (note trailing space) to the beginning of the line. No prompts.
It's already visible in the stdin tab of the tool result dialog.
There is also the stdout tab.
The only problem is that, as far as I know, it's visible only if there is something in the stderr.
N.B. of course you can always change the return code of the tool.
The only other time I worked on a script without going through a webpage was for Audit Barlines and I opened that tab many times. I'll be giving the 99 rc and StdOut a try soon.
This is the newest version--I also tested the Wscript.Echo statement
WScript.StdOut.Write(WScript.StdIn.ReadAll());
WScript.Echo("Testing"); // This line may be taken out.
WScript.quit(99);
/*
WScript.StdErr.Write(WScript.StdIn.ReadAll());
WScript.quit(1);
*/
Same information, just in a different tab.
This might be helpful when working on scripts that change the staff (Return Code == zero).