Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

Read content from Clipboard (Windows)

$
0
0

I'm working on a script to transfer data between AE and another application and would like to use a copy/paste workflow. On Mac there seems to be command-line utilites for this but not on Windows. I did however find this, which seems to work if I run it from a bat file. Is there a way to call this command directly? Something like this:

 

var s = '@if (@CodeSection == @Batch) @then' + '\n'+
'setlocal' + '\n' +
'set "getclip=cscript /nologo /e:JScript "%~f0""' + '\n'+
'%getclip%' + '\n'+
'goto :EOF' + '\n'+
'@end // begin JScript hybrid chimera' + '\n' +
"WSH.Echo(WSH.CreateObject('htmlfile').parentWindow.clipboardData.getData('text'));" + "\n"


var clipboard = system.callSystem("cmd /c \""+s+"\"");


alert(clipboard)

 


While this runs, it doesn't return anything. Any advice?

 

Best regards,

Simon


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>