Right now I am using the prompt command as a workaround to copy arbitrary text out of my JSX script in Photoshop.
prompt("to copy",(horizontalcenter.toString()) + ", " + verticalcenter.toString());
And that is giving me the information that I want. The "to copy" just gives the title, then the information I want to copy out of Photoshop is in the prompt box already selected. So all I have to do is hit control C, go to Notepad++ where I need this information, and hit control V.
It works, but it could be faster. There has to be a way to copy this information out of Photoshop straight to the clipboard, no?
Found the answer on a Photoshop scripting forum.
http://ps-scripts.com/bb/viewtopic.php?f=9&t=3097&p=15324&hilit=clipboard&sid=1b1cc023023b9f91ab46e30e48e2ab53#p15324
It's placing the text you want to copy in a temp text file, then copying it from that text file. I didn't even know you could place text into a text file. Apparently the javascript capabilities in Photoshop are much more powerful than I realized!
Photoshop 13.1 (the latest Creative Cloud release of Photoshop CS6) now has a hook allowing you to do this directly. Here's a sample function:
Please note this won't work in versions of Photoshop prior to 13.1