Copy link to clipboard
Copied
I'm trying to transfer data from some programs to AE and the most simple way to do it would be using the clipboard. Or so I thought.
I managed to get it pasted into an edittext field and read that, worked great, but it's limited to 30,000 chars, which seems like a lot, but once you deal with matrices as strings it's not.
I found a script for ID that captures the event.originalEvent after the user pastes inside the application. Is there a method similar to that for AE edittext fields?
How can I find out what attributes an event has?
function onMyTextChanged(event) { /*reat the event*/ }
I found event.target.text for example, that helps or I can close the event.target.parent window immediately, but I'd like to know what else I can read from the passed event argument. Any Pointers?
Copy link to clipboard
Copied
I think the only way to read the clipboard in a script is to use
callSystem
https://ae-scripting.docsforadobe.dev/general/system.html#system-callsystem
and then call a system command that reads the clipboard.
I use this to write the content of the clipboard to a file on Mac OS
Copy link to clipboard
Copied
Thanks, that helps. But I really don't want to write files or access the cmd.exe, I'm writing a plug-in and I don't want to scare people using it. I was hoping to intercept the "original event" which would have been the paste command of the user.