Copy link to clipboard
Copied
Does anyone know if you can recreate the duotone color selection in a script? I want to have it in my image processing script
Thanks!
I think that you misunderstood my post.
It is available to scripting, just via Action Manager code recorded via the Scripting Listener plug-in that writes JavaScript to a log file. The result of converting an action to script results in similar "more complex" code as found in the 2nd example below.
Take the following example of "simple" standard "DOM" code as found in the JavaScript reference to invert the colours of an image:
app.activeDocument.activeLayer.invert();
Compared to "mor
...Copy link to clipboard
Copied
Yes, however, you will need to record this using the Scripting Listener plug-in as I don't believe that this is available via standard DOM code:
https://blogs.adobe.com/crawlspace/2006/05/installing_and_1.html
Or record an action, then convert the action to a script via xtools:
Copy link to clipboard
Copied
that's disappointing it's not accessible via script. Actions to script seems interesting though
Copy link to clipboard
Copied
I think that you misunderstood my post.
It is available to scripting, just via Action Manager code recorded via the Scripting Listener plug-in that writes JavaScript to a log file. The result of converting an action to script results in similar "more complex" code as found in the 2nd example below.
Take the following example of "simple" standard "DOM" code as found in the JavaScript reference to invert the colours of an image:
app.activeDocument.activeLayer.invert();
Compared to "more complex" action manager code recorded by Script Listener to perform the same process:
var idInvr = charIDToTypeID("Invr");
executeAction(idInvr, undefined, DialogModes.NO);
Or a more "user friendly" version of AM code from the Clean SL script:
invert();
function invert() {
var s2t = function (s) {
return app.stringIDToTypeID(s);
};
executeAction(s2t("invert"), undefined, DialogModes.NO);
}
In many cases, the "more complex" AM code runs faster than the "simpler" code available in the JavaScript reference guide. For duotone mode, it's a moot point anyway, unless I'm mistaken, there is no way to do this using the "standard" code in the JavaScript reference guide.
Copy link to clipboard
Copied
Ah, I see!
I'll give it a try using ScriptListener, thanks for clarifying.
Copy link to clipboard
Copied
Just out of curiosity: Are the images actually going to be printed with spot colors?
Copy link to clipboard
Copied
Yes, I work in pre-press for publishing. We sometimes have clients with purely duotone images, and would love to speed up the process