• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Launch a dockable jsx script from CEP extension panel?

New Here ,
Mar 20, 2022 Mar 20, 2022

Copy link to clipboard

Copied

Hello, I have a dockable jsx script that I've rolled into an extension (because I need to do some fetch requests before loading it). So basically the CEP panel is only to make use of node js, authenticate the user, then it just needs to load the jsx where everything else will happen. I just can't seem to figure out how to load the jsx as dockable (as if it was run from ScriptUI folder). If there's no way to launch it as a dockable panel, is it possible to have it replace the contents of the extension panel (which is already dockable and has no use once the user is authenticated)?

 

I just really want to avoid rewriting my jsx code to hook up to CSinterface, since it already works fine and is just missing the dockable feature. Any ideas on this?

 

Thanks!

TOPICS
Expressions , How to , Scripting

Views

287

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2022 Mar 20, 2022

Copy link to clipboard

Copied

As far as I know, dockable jsx scripts can only be created by installing the jsx into the Script UI Panels folder and then launching it from the Ae menu. Maybe your cep panel can execute the menu command with app.executeCommand?

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 20, 2022 Mar 20, 2022

Copy link to clipboard

Copied

Thanks for that suggestion - I think ordinarily that could work but I need my script to only be run by someone who has authenticated through the CEP panel

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2022 Mar 21, 2022

Copy link to clipboard

Copied

Then your only option is most likely to implement your user interface as a CEP panel and not with script UI.

Alternatively, you can save the jsx as a string inside your CEP panel code and then use csInterface.evalScript

to execute it. But this will have the limitation that you don't have a dockable panel.

 

If you want to disallow usage without autentication in a relibale way, also keep in mind that whenever you have the jsx in a file as part of your panel, any user could simply copy this file to the "ScriptUI Panels" folder  and use the file standalone. Hence, embedding it in the CEP panel code and obfuscating the CEP panel code is the better option.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2022 Mar 21, 2022

Copy link to clipboard

Copied

Ah I see, thanks for that. I don't suppose there is any way to make a fetch request to an api purely through extendscript then? Say the script already has the access token and the api url, and just needs to perform a check? I could possibly eliminate the issue entirely this way, but as far as I can see there isn't a way to do it.

 

Thanks again!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2022 Mar 21, 2022

Copy link to clipboard

Copied

LATEST

Actually, I just realised you can use curl - that solves my issue! Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines