How to open and run photoshop script from Illustrator CEP

Participant ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

I'm currently running some scripts in CEP illustrator.  Using 

const csiRun = new CSInterface();

I would like to also run some Photoshop scripts n photoshop in example.

In example open a photoshop document but also make photoshop active so I can run photoshop scripting commands.  Is this possible?

TOPICS
Scripting

Views

144

Likes

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

correct answers 1 Correct Answer

Adobe Community Professional , Apr 23, 2021 Apr 23, 2021
You can have a bridgetalk-using method in your Illustrator script that does the photoshop script and gets the result back. Check out this thread: https://community.adobe.com/t5/illustrator/how-can-i-read-the-color-of-a-given-pixel-in-an-image/m-p/9353268

Likes

Translate

Translate
Adobe Community Professional ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

You can have a bridgetalk-using method in your Illustrator script that does the photoshop script and gets the result back. Check out this thread: https://community.adobe.com/t5/illustrator/how-can-i-read-the-color-of-a-given-pixel-in-an-image/m-p...

Likes

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
Participant ,
Apr 26, 2021 Apr 26, 2021

Copy link to clipboard

Copied

Thank you! Looking at the sample you sent, I see this method:

 

  function bridgeTalkEncode(txt) {

    /* thanks to Bob Stucky */

    txt = encodeURIComponent(txt);

    txt = txt.replace(/\r/, "%0d");

    txt = txt.replace(/\n/, "%0a");

    txt = txt.replace(/\\/, "%5c");

    txt = txt.replace(/'/g, "%27");

    return txt.replace(/"/g, "%22");

  };

 

 

Is the idea to pass a regular method like:

function myMethod() {

//all my code }

into this method:

bridgeTalkEncode(myMethod);

Something like this?

Or can I just stringify an entire method and pass to the BridgeTalk?

I get that I have to create a string for it to be passable but didn't know if I can string the whole method type at once.  Does my question make sense?

Likes

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 Professional ,
Apr 28, 2021 Apr 28, 2021

Copy link to clipboard

Copied

LATEST

Likes

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