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

Photoshop API: Execute Action: Custom (JS) Script ?

New Here ,
Nov 02, 2021 Nov 02, 2021

Copy link to clipboard

Copied

Hello! I'm wondering if it's possible to use the Photoshop API to do the following:

 

1. create new file/artboard at specific resolution

2. run a custom Photoshop script written in Javascript

3. (save output as PNG to my node server)

 

I see the API reference has an Execute Action post method but I'm not clear how I would setup the action? Would I make my script a photoshop action, export it, and upload it to a cloud service with a public web url?

 

Thanks! 🙂

 

TOPICS
Actions and scripting , SDK

Views

715

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
Adobe
Community Expert ,
Nov 02, 2021 Nov 02, 2021

Copy link to clipboard

Copied

LATEST

I'm not sure about the API, however, one can call a JavaScript from a JavaScript. No need to put the script call into a doAction.

 

 

// GUI
(function () {
    var selectJSX = File.openDialog("Select a JSX file to open", "Select:*.jsx");
    if (selectJSX === null) return;
    var cleanJSXpath = selectJSX.fsName.toString();
    $.evalFile(File(cleanJSXpath));
}());

// or

// No GUI
$.evalFile(File('~/Desktop/myScript.jsx'));

 

 

 

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