Question
Possible to copy string to Windows clipboard?
I'm trying to write a short script to add a context menu item that copies the selected item's URI to the Windows clipboard so I can paste it into an email.
The following code shows the string in an alert box:
if (app.document.selections.length==1)
{
var myPath = decodeURI( app.document.selections[0].path);
alert(myPath);
} else if (app.document.selections.length==0 || app.document.selections.length>1)
{
alert("Please select single file or folder");
}
I thought this might be ok but since I can't highlight the text on the alert box it doesn't help much. Is there any way to copy a string from the script into the Windows clipboard?
The following code shows the string in an alert box:
if (app.document.selections.length==1)
{
var myPath = decodeURI( app.document.selections[0].path);
alert(myPath);
} else if (app.document.selections.length==0 || app.document.selections.length>1)
{
alert("Please select single file or folder");
}
I thought this might be ok but since I can't highlight the text on the alert box it doesn't help much. Is there any way to copy a string from the script into the Windows clipboard?
