Skip to main content
Participating Frequently
October 7, 2021
Answered

How Can I Copy String in a variable to clipboard in extendScript for Premiere?

  • October 7, 2021
  • 1 reply
  • 1184 views

How Can I Copy String in a variable to clipboard in extendScript for Premiere?

I tried to use hint from https://community.adobe.com/t5/after-effects-discussions/how-can-i-copy-string-in-a-variable-to-clipboard-in-extendscript/m-p/10930590, but for Premiere it doesn't work.

There is a System module for After Effect, but not for Premiere (((.

This topic has been closed for replies.
Correct answer Bruce Bullis

> How Can I Copy String in a variable to clipboard in extendScript for Premiere?

 

You can't, directly from ExtendScript. However, a CEP panel's ExtendScript could send that string to its JavaScript layer, then do so.

 

https://www.w3.org/TR/clipboard-apis/#async-clipboard-api

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
October 7, 2021

> How Can I Copy String in a variable to clipboard in extendScript for Premiere?

 

You can't, directly from ExtendScript. However, a CEP panel's ExtendScript could send that string to its JavaScript layer, then do so.

 

https://www.w3.org/TR/clipboard-apis/#async-clipboard-api

KarMikeAuthor
Participating Frequently
October 7, 2021

Thanks a lot. But there is two questions in addition )). Sending a string to the clipboard via

navigator.clipboard.writeText

is working, if I open index.html in Chrome. But if I open it in Premiere - it doesn't work.

And the next question - can I send information back to my panel from my jsx file ?

(realy what I need - generate string with information in my jsx code and send it to clipboard.)

ps: sorry for stupid questions )).

Bruce Bullis
Community Manager
Community Manager
October 7, 2021

Sorry, I have no knowledge of navigator.clipboard.writeText.

> And the next question - can I send information back to my panel from my jsx file ?

 

Yes! PProPanel does that in a couple of cases: here's the ExtendScript side, and the related JavaScript side