Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

how to communicate between ExtendScript and Generator-core

$
0
0

I am running a separate node server as described in this tutorial to create a plugin with generator-core. http://tomkrcha.com/?p=3896

 

I am in a situation where I need to send a lot of JS to photoshop via generator.evaluateJSXString(). But this can get out of hand easily as you can only send a string. So for any complicated functionality it becomes difficult to maintain. Is it possible define a bunch of functions in a extend script file and then call those functions from the node app?

 

So i could send:

generator.evaluateJSXString('doSomeStuff()');

 

And in a script somewhere (I don't know where this script should go)

 

I have that function defined which can do some stuff

 

function doSomeStuff(){

     for(var i = 0; i < 10; i++){

          doc.artLayers.add();

     }

}

 

Where would the Extend Script File go in this instance? OR is there a better way to achieve this sort of thing.


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>