Copy link to clipboard
Copied
Heyoo,
I regularly have between 4 and 6 documents i need to work across that need bulk text changes that range from single words to whole paragraphs (it doesnt sound like a lot but there is regularly 20-40 comments and i'll need to do the changes across all docs, so end up doing the same thing mulitple times). Is there a way i can search and change the text across all open psd files instead of one by one? I've looked in other posts but cant quite figure out what to do (never needed to use the script function before).
Using PSD 2023 24.0.0
Really want to be able to steamline this so i can spend more time on actual art than text changes!
Thanks!
Copy link to clipboard
Copied
The following example uses a hard-coded regular expression to change the isolated word dog to Cat in all text layers in all open documents.
// Replace text Dog with Cat in all layers in all open docs.jsx
for (var i = 0; i < app.documents.length; i++) {
app.activeDocument = app.documents[i];
var doc = app.activeDocument;
for (var j = 0; j < doc.layers.length; j++) {
try {
doc.activeLayer = doc.layers[j];
// Find = Dog, Replace = Cat
// g = global, i = case insensitive
if (app.activeDocument.activeLayer.kind == LayerKind.TEXT) {
doc.activeLayer.textItem.contents = doc.activeLayer.textItem.contents.replace(/\bDog\b/gi, 'Cat');
}
} catch (e) {}
}
}
More here:
And here:
Searching the forum or web will kick up more...
Copy link to clipboard
Copied
Thanks heaps for replying!!
Can you EILI5? i've got zero idea how to impliment it and i've been trying for a bit 😫
Copy link to clipboard
Copied
Ok, I had to Google that...
Quickstart:
If these simple instructions are too abbreviated, you may need to read on...
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Do you want to continue to exclusively use Photoshop for these designs? Is there any chance you would consider placing your Photoshop files into InDesign documents? If so, you will get access to a huge array of text editing and updating options.
Copy link to clipboard
Copied
If that simple snippet works you are good. If you need to preserve formatting, I have some sample scripts on my Dropbox for replacing text.
https://www.dropbox.com/sh/mg817g9a9ymbasi/AADTmXUVxmFfM58bcyYE7yiwa?dl=0
Copy link to clipboard
Copied
@Lumigraphics – Ah formatting... Looks like I forgot about that! :]
Copy link to clipboard
Copied
Formatting is a huge PITA, frankly.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now