Copy link to clipboard
Copied
Is there a script for InDesign that will open all my images in photoshop - run a batch process I have made to convert all images, adjust the levels, save and close. I know I can do it in photoshop almost just as quick and them update the links in InDesign, but wondered if it could be done to save a few minutes work.
Copy link to clipboard
Copied
It could be written using BridgeTalk, but you're probably better off just packaging the INDD file and running the batch process on that packaged folder. Not aware of any existing solution.
Copy link to clipboard
Copied
Hi @Matthew5C62 , Here’s a Bridgetalk example that will open any image links into Photoshop and run an action—edit the doAction line as needed.:
adjustImages()
var np;
function adjustImages(){
var bt = new BridgeTalk();
bt.target = "photoshop";
if (app.documents.length > 0) {
var lnks = app.documents[0].links;
for (var i = 0; i < lnks.length; i++){
if (lnks[i].parent.constructor.name == "Image" ) {
runAction(lnks[i].filePath, bt)
while (lnks[i].status != LinkStatus.NORMAL) {lnks[i].update()}
}
};
} else {
alert("No Documents Open")
return
}
}
/**
* Run an Action on open image
* @ param Link’s file path
* @ param Bridgetalk instance
* return new file path
*/
function runAction(pa, bt){
bt.body = psScript.toString() + "\rpsScript('"+pa+"');";
bt.onError = function( inBT ) { alert(inBT.body); };
bt.onResult = function(resObj) {
np = resObj.body
}
bt.send(1000);
function psScript(pa) {
app.bringToFront();
var of = open (File(pa));
//edit this line to your action and its group, string is case sensitive must be exact.
doAction ("ACTION NAME", "ACTION GROUP");
try {
of.close(SaveOptions.SAVECHANGES);
}catch(e) {}
return pa
}
};
Copy link to clipboard
Copied